I like what Charlie Munger says. You shouldn't have the right to argue any opinion unless you can argue the other opinion better than they can. I thought that was a great thing. I'm like, that is the secret to life. Can you be well-rounded? The problem in the modern world, you see this with politics, you see this on Twitter, you see this in Republicans and Democrats, you see this in capitalists versus socialists. Nobody can argue the other side. You see this in ultra feminism and versus ultra right-wing beliefs. Does anybody walk in the middle path anymore? And usually down the middle is correct, but it's not as sexy. It's not as sexy. Sexy is taking a strong position.  You don't go that viral for telling people the actual balanced truth, you know? So be balanced.


What better place than Manley to observe the centenary of TS Eliot's publication of The Wasteland. He first published it in his debut issue of his own magazine Criterion back in 1922. TS Eliot grew up in America, graduated from Harvard and moved to England. And there's a great article in The New Yorker, The Shock and Aftershocks of The Wasteland by Anthony Lane. The whole poem, and with any luck, nothing but the poem. Publishers too are paying heed to the centenary. Newly available is Eliot After The Wasteland, the second volume of a capacious biography by Robert Crawford. The first part, Young Eliot from St. Louis to The Wasteland came out in 2016. Notice how the poem is named in both titles as the unarguable hinge on which Eliot's existence turned. From Lyndall Gordon, who has already written copiously on Eliot's life, comes The Hyacinth Girl. TS Eliot's hidden muse, due in November, which allots a central place in the poet's imaginative world to Emily Hale. An actor and drama teacher for whom he concealed a lasting love. More than 1100 letters to Hale from Eliot, secreted for 50 years in Princeton's Firestone Library and unsealed in 2019, form the basis of Gordon's discoveries. Her contention is that when Eliot writes, we came back late from the Hyacinth Garden in The Wasteland, it is Hale and only Hale, whom he is addressing. Readers who like their literary criticism on the lofty side, his romantic attachment to her light across the sea, bringing back his purity of heart, will be on velvet. More grounded in its ambition is Matthew Hollis' The Wasteland, a biography of a poem, due in December. Hollis delves into the deep background from which The Wasteland arose. Eliot's childhood in Missouri is the scion of an uncomfortably distinguished unitarian clan, summers on the coast of Massachusetts, his Harvard education, his fleeing to Paris and London, his marriage to a young English woman, who he scarcely knew, Vivian Hague Wood in 1915, the incurable horror of that union, rich in sickness on both sides, his fruitful friendship with Ezra Pound, without whose reshaping The Wasteland would not have flourished as it did, and the books on which Eliot fed. There is genuine suspense in the air as Hollis invites us to listen out for murmurs and rumors in the poet's letters of long ago. Something was approaching and Eliot could sense it. He needed calm to make a storm. He had been anxious to get on to new work. December 1920 had wanted to get to work on a poem he had in mind. October 1920 sought a period of tranquility to do a poem that he had in mind. September 1920. If you take fright at the intensity of such studies, or if you simply lack the shelf space, I recommend a new art devoted to The Wasteland. Candy Crush are those of us who found fault with an earlier version in 2011, and have pined for an update. The app bristles with textual information and commentaries, and with readings of the poem by Alec Guinness, Ted Hughes, Vigo Mortensen, a duo of Eileen Atkins and Jeremy Irons, and twice Eliot himself. There is also a performance of The Wasteland by Fiona Shaw, though whether and how it should be performed, despite being pentacostically thronged with voices, is open to debate. The revelation is Mortensen, who is quick and quiet, revering the text while not allowing that awe to shade into stiffness or pomposity. Oh, thank God we wouldn't want that awe to shade into stiffness or pomposity, would we mate? No way.


Good morning! It's nine. We're gonna get started. How many of you were here yesterday? Oh, that's a lot of people and that's why you're here on time. Because we like to start on time and end late. That's how we do it. All right. A few people were asking about slides and other things I'm gonna do. I'm gonna give the welcome talk after this where I'm gonna talk about some of these logistics. But I wanted to kick off the day with something that's very important and hence we have Martin here. I actually met Martin a couple of months ago in Hong Kong. We were both presenting at a conference. Martin was doing his talk on, you know, the performance stuff that he's been working on. And one of the things that occurred to me as functional programmers, we seem to be so away from the metal that, you know, a lot of times we actually talk a lot about using multi-cores and stuff like that. And sitting in his talk, it realized that I actually don't understand anything about even using a single core. So I think Martin's talk is really gonna help understand. It was actually a request to Martin to kind of create a new talk for this conference to talk about some of the things of how we can actually leverage a single core and then talk about how we can leverage multi-cores. So without too much due, thanks Martin. Oh, what do you? Okay, good morning, everyone. Hopefully you can all hear me. Everyone awake? I'm asleep, had coffee yet. I'm gonna ask questions. I'm gonna be a scary presenter. I'm gonna come out and talk to you for a while. It's gonna be very scary. So my normal programming languages are not one of the functional languages. Can I confess a little bit? I write Java most of the time, which is probably pretty horrible to most of the people here. I write a lot of C, C++, and I even write a fair bit of Xcd6 assembler. So that's all horrible, horrible stuff. But truth be told, I actually like functional programming and I do a fair bit of functional programming. If anyone sees my C or Java, it actually looks quite functional. And there's a lot of really good things in this space and what I want to talk today about is how do we bring together some of the functional side along with a kind of awareness of how computers actually work and also some basic mathematical principles and we're gonna kind of dig into this a little bit. So, kind of, let's start off with a question. I wanna look at memory operations. We're all kind of used to like, is all memory equal? Like it's random access memory. It doesn't matter really what we do, but does it? Let's sort of test some of our thinking, test some of our understanding. So here's a simple question.  And if that array is one gigabyte in size, what is the average time per operation to do this? So I said I was gonna ask questions, so I am. What do we think? How much time, let's say nanoseconds, microseconds, milliseconds, what do you think? How much time does it take per element in the array? And you gotta think, I've gotta load the element. I've gotta sum it up into a scalar for what I had before. I'm gonna move on to the next element, I'm gonna load it, sum it up, and move on. What is the average per operation to do that? Depends. Depends. Good answer. That's always the right answer in computing. It depends. But if we were to measure, what do we think we're gonna get? What would be the typical average on, say, a three gigahertz machine? Or two gigahertz machine, actually, is what I tested this one on. Guesses? Ten. Ten what? Ten nanoseconds. Okay, cool. Let's see. If I actually run the test, this is the answer, I guess. So I've written a benchmark, I'm gonna actually warm up a VM and get the result. And I find that it's actually 0.8 of a nanosecond per operation. And it kind of goes, ugh! When you run this, how do I end up with one nanosecond approximately? Well, we're probably quite surprised if you look inside a modern processor. Because you can think, what is this? Is it really this one nanosecond? This is inside a Huzwell CPU. Sorry for the squish screen. We had something with the presenting mode. But inside, we don't have one ALU. If you sort of studied at school and you look at the all sort of all human architectures, we look at, we have one ALU, we've got memory. We don't have one ALU in our modern processors. In fact, we have a scheduler inside the processor. This is not an operating system scheduler. This is inside the processor itself. Inside a processor core, not a processor socket. And we have eight ports on that scheduler. And of that, we have multiple ALUs. Look, there's an ALU, there's an ALU, there's another one. There's another one. Four inside a typical CPU core. So you can be doing four integer operations at the same time. And you sort of think, how can I do that? I've written single-threaded code. How can I get that level of parallelism out of my data? You find there's actually a lot of natural parallelism in code when you write it. For example, if I'm going to go over that array and I'm going to add up all of the values in the array and incrementing the value, which is the summation that I have so far, I'm also incrementing the index that I'm walking over that array. Those two things can happen at the same time. And they can actually happen slightly before, slightly after it doesn't matter as long as it's ready by the next iteration. And we can go forward with that. So we get quite a lot of natural parallelism that's inside there. So we're looking at, I've got a load, a piece of memory. I'm going to store it in a register. I'm then going to increment the value of this scalar that I've been keeping for the summation by that register. I'm going to store that result. And then I'm going to write it back out at the end. And I'm going through doing this. So our processors can do a lot at the same time. But let's make it a bit more interesting. What if I've got a different pattern of access? Yes. Yes. No, there's no paging. Yeah. Good question. Good point. So yes, this memory has, the way the benchmark has been set up is I've actually created an array of one gigabyte in size and I've pre-initialized it with random values. And particularly it's important to do this with random values so that the compiler just doesn't eliminate all of the dead code and give you the answer at the end. Because our compilers are very smart. They won't compute something at runtime if they can do it at compile time and sort of save all of that. So this is an array that's been pre-allocated with random values put into it. So we get these sorts of results. There's some different patterns. What if, rather than going through the whole array linearly, I decided to stay within an operating system page, a 4 kilobyte page, and go around and pick values at random and add up all of the values that are in that 4K page, then move on to the next page, do the same thing. Move on to the next page, do the same thing. So I'm going to do the same amount of work, but I'm going to do it with a different access pattern. And then I'm going to try stuff. If I just randomly go around the whole heap and do that, will that make a difference where I'm not inside the same operating system page? Or how about, let's make it really interesting, if I go from one step to the next step, and I can't take the next step until I know the value of the previous step. So the next function, the step function that I'll apply needs to have read the cell and the random values in the cell would feed into the random step that goes next. I'm going to write this so that it's going to all do roughly the same amount of work, because we have all of these ALUs and we have all of the address generation units to do all of this work in parallel without really impacting the code. The only thing that's going to be different is the memory access pattern. Let's see what happens if I benchmark some of those different scenarios. So here's these different scenarios. We had our sequential pattern going through this. Let's do randomly within a page and then step on to the next page. Randomly within a page where the next step is dependent on having read the previous value, randomly through the whole heap, and then randomly through the whole heap whereby the next step is based upon the previous value. Same amount of work, big difference in the different steps. And for those at the back of you who can't quite read it, it's nearly 90 nanoseconds when I'm going random through the whole one gigabyte heap where the next value is based on the previous one. I think, well, why is this so different? Well, our hardware is doing some very nice things for us. So in the first simple cases where we're just linearly going through the array, reading everything sequentially, we have a thing called a hardware prefecture helping us where it's going ahead, getting the memory before we need it. It's helping us out. It's going to have the memory in our cache ready to use whenever we need it. The in-page random one is benefiting from different things. So it doesn't have that hardware prefecture, but it has the thing called a TLB cache, a translation look-aside buffer where our virtual memory addresses get converted to physical memory addresses.  We do this lookup on a per-page level, not a per-address level. So if you stay within the same operating system page, you benefit from that cache. If we start going down to the wider heap, the heap is too large, in this case, for the TLB cache to benefit. It's too large to benefit from the prefecture. But there's something interesting going on with the dependent loads. Now, what's that? Well, what's kind of interesting is we can have a cache miss going on to main memory.  If it's in the cache, we get it. If it's not in the cache, we've got to go to memory to get that. We can have 10 concurrent cache misses being tracked concurrently by our X86 processors. And so in the case of where you've just got random values and there's no dependency between them, those 10 can go off at the same time. They can be amortized and come back at the same time. So we divide the cost, basically, by 10. If you take one step and you can't take the next step until you know the value of the previous one, there's no going off in parallel to get it.  If you don't get the first item and you still have to feed that into the next one, you can't go ahead and get the other nine items.  So how much dependency we have in our data structures and our code starts to really matter. And this becomes fundamental to a lot of our design, the design of our data structures, the design of our code. So let's go forward from that. So I'm going to sort of expose you to some fundamental laws and then we're going to dig into some implementations and see what happens. So software and fundamental laws. Anybody know what that is? Come on, this is India, the home of mathematics. Q in, yeah. Kendall notation, that's an MD1Q. So how does this play out? If we want to work out the mean response time of something, we need to know the service time and we need to know the utilization of something. Service time and utilization are very interesting in how they work. So service time is the time to do a job. Utilization is if I have some resource, how much of its time as a percentage is busy doing that, for example. If I have a job that takes 100 milliseconds and I'm using it once per second, I'm using 100 milliseconds per second is 10% utilized. If I'm using it five times per second, it's 50% utilized. So you'll see this little equation quite often where rho equals lambda s. And rho is utilization, lambda is the arrival rate and s is the service time. You'll also hear this called little's law. It appears in lots of places. Really fundamental to how things work. So we plug in some figures to this. What does it look like from a response time perspective? And you'll see that this is not a linear function. So if I increase the utilization along the x-axis, what happens to the response time on the y-axis? Things look pretty good as you ramp up utilization until you start getting to about 70%. Then all of a sudden you go up this curve where things become unresponsive. And so if you use things too much and you have no slack in your system, you end up with something very unresponsive. It doesn't respond. And if you work in teams, you'll know this if there's no slack in your teams, you just can't react to requirements from the business. So anybody who's got a project manager hat with the worst sometimes, be aware that if you work your teams to the limit, they become totally unresponsive. How can we put this in a little bit more context? That's what happens when you get something fully utilized. I'm a huge fan of cars. And the road system here is insane. I have never seen anything like this before. So I can look at the mathematics of queuing theory and see what's going on. And your road system is a wonderful example. When you use something too much, this is what happens. And it ends up with gridlock. So how could we make this better? So tip for driving. If you leave no space to the car in front, you have no slack. And if you get no slack when something goes wrong, you have no buffering. And that's what ends up as a result. So if you want to tip to improve your driving, keep a little bit of distance. As basic mathematics, you cannot get away from it. Yet most people drive right up to the car in front of it. It happens all over the world. So we've got to give it a little bit more slack. It comes the same in our software. We'll see some of this later. What's this one? Maybe less people can recognize this. Anyone heard of Amdahl's law? Yeah, this is not Amdahl's law. This is actually what's known as universal scalability law, which takes Amdahl's law further. In fact, Amdahl's law was just an argument put together by Jean Amdahl to scare people away from mini computers. He wanted you to buy his mainframes that were very fast, single-threaded machines. He wanted people to use them rather than the mini computers. He wanted to scare people off. Neil Gunther, who came up with universal scalability law, discovered that when he was measuring stuff at Xerox Park, that they couldn't achieve Amdahl's law. They couldn't get the scale-up factors. And what he realized is there's two major components to scaling. One is the contention penalty, is what Amdahl talked about, which is the alpha in this. But there's also the beta that needs to be considered, and that is the coherence penalty. What is coherence? How do we think about that? Well, it's really agreement. Whenever you've got multiple parties working together, it takes them time to agree to do something. It's not even just the time that's the contended part. You have to agree that. So in a cash subsystem, that's the time to get the state to where everybody knows what's going on, so you have agreement. And without that, you really limit what's going on. What's this look like if we feed in some figures to a graph? So let's take a job, and this job can be run 95% in parallel. That's pretty good, really, in many cases. So there's 5% of it I have to do, say, under a locker, under some form of contention. 95% of it I can do in parallel. If I add CPU cores or CPU nodes of some description, how does it scale up? But then I'm going to mix in a coherence penalty, and the coherence penalty in this case is 150 microseconds. What would be the difference between a pure Amdahl's law and a universal scalability law? Well, you get this graph. This blue line is Amdahl's law in action. So as I add processors, the speedup that I get as a factor never reaches 20x. Because if you think about the problem, if it ends up being 95% parallel, one 20th of it, the 5%, cannot be done in parallel. So it doesn't matter how much you subdivide the rest. It's still left with that one 20th, so you cannot get more than a 20x speedup, no matter how many processors you put at the problem. But what if it takes some time to get agreement? And the agreement becomes interesting, and on small numbers of processors, it's easy to get agreement. As the number of processors goes up, the cost to get agreement starts to actually become the dominant factor. You don't even get to that, and after a while, the cost of agreement starts to go down. Anybody notice how you work in teams? Small teams are really good, they're really productive, and as teams grow to a certain size, they actually slow down. It's mathematics. It hunts you down. There is no escape. You cannot beat mathematics. It gets you, and that's the basic coherence penalty that's going on here. And so you see this in lots and lots of places. Let's put this again into real life and context. This is what happens when you try to get agreement to cross a road without rules. It slows down because you're spending so much time reaching agreement rather than getting the flow. What I find kind of fascinating in this picture here is if we look up here, that's a stoplight. Are those like, are those decoration here? They're just like out of a little bit of color to the street. It seems that nobody uses them. I've seen this in Italy as well. It's also a common factor. I think in Italy they're advisory. I've seen sort of here, Brazil, a few other places, they're really like just decoration for street furniture, and people do their own thing. If we get organized and we get the agreement quicker, we can achieve really quite cool things. Now where is some of this going? It's kind of interesting. For a long time we've had single processors, in the machine, what if we have many more processors than where are we going? AMD are just bringing out their new Ryzen chips, and their server infinity chips are kind of fascinating. This is like what an AMD chip looks like in a server. We've got four little groups of chips on the same socket. Each of those have got eight CPU cores, and those individual cores can run two hyper threads. So we've ended up with 32 here and 32 over here, and they're all interconnected in different ways. What's interesting about this is you've got so many cores that are freely available now so we can go in parallel, but if you look at the interconnects, they're all not the same. You've got different levels of coherence time, so you cannot escape this. So two cores talking together here are very different from a core here talking to a core over there, and taking a walk through this mesh. So the figures I showed you from memory access times are your best case scenario on a single core. This gets much worse in multicore because what if you're going to memory and you're joining the queue waiting? Queuing effects come in. If you start dealing with cores communicating that are on different sockets and across this and using the fabric to talk with longer latencies, you've got more of a coherence cost. So we end up with there's a lot of time that we didn't think about. So how do we design for things and deal with it, and particularly how do we design whenever we care about what's going on underneath this? Who's heard of NUMA effect? Non-uniform memory access? That's what this is. Memory costs are not the same these days. Depending on the location, next a big difference, so it really is location, location, location matters a lot. How do we put this together? There's an interesting concept called systems engineering and that's where we got to look at problems as a whole. If you're a mature engineering discipline that exists in another field like the mechanical engineering, chemical engineering or an article, you don't do your one little bit. You have to have a wider view of what's going on. You can specialize in an area, but you need a wider picture. And today we need to have some understanding of our stack on which we run, choice of what our data structures, choice of what our programming patterns apply to that. And if we show some of that sympathy, we can achieve really good things either for our hardware and either for software on the whole. So I want to sort of talk about like how do we put some of this in context, what sort of stuff is useful. And I want to use an example of a messaging system I worked on. So I'm going to pick messaging because messaging is a kind of cool example. It has lots of really interesting features. It also happens to be something I'm quite experienced at. When we deal with messaging systems, they are highly concurrent. So we've got to deal with all of that side. They're also distributed. So the coherence costs can get to be quite large. And they also require not just the CPU and memory knowledge. You also need to have a fairly good knowledge of networking and what can go on if you build one of these things from scratch. So it becomes a really good task case for how we put some of this stuff together. And so you look at what are some of the normal approaches. So if you're going to build a normal messaging system, you can take the easy route. And the easy route is you build it on top of TCP and a lot of the world is taking care of it for you. The hard route is you build it on top of an unreliable protocol like UDP. You can get certain benefits to that and we're moving very much in this way because TCP was not designed for what most people are using it for. It's actually a really good protocol that's designed for something else than what everyone's typically doing with it today. So anybody here use Google Chrome? Do you use any Google services like Gmail, Google Docs, all that sort of stuff? When your Google Chrome browser is talking to one of those Google services over HTTP, do you think you're using TCP? Anyone think they're using TCP? I think most people probably think they are. In fact, you're not because Google have realized that TCP is an inappropriate protocol for that and they're using a protocol called Quick that runs over the top of UDP and it's based upon a lot of the problems that we're having with queuing and setup and different ways of working. So I'm working on our messaging system called Erron. It's UDP based in doing similar things because it's more suitable for this sort of environment. But once you go to UDP you've got a couple of interesting problems. Like how do we deal with this unreliable data? Like we send a packet from one machine to another. It may not get there. It may arrive in a different order than you sent it.  They'll arrive in a different order. They may in fact arrive multiple times. You get some really interesting things that you've got to deal with. And so to do that, you have to use some interesting data structures. And typically those data structures are things like skip lists, trees, score boards, those sorts of things where you put together the packets on the side so that they're back in the order that you sent them in and not where we can deal with it. It becomes an interesting challenge. Now typically if you look at trees or any structures like this you end up with something that's got a lot of depth. And what happens when you go from node to node? Remember the memory access to being dependent? Data dependencies? It's called a data dependent load. You'll also hear it termed as pointer chasing. This is one of the biggest performance hits you will take on a modern processor. So if you've got link lists, if you've got any sort of data structure where you can't get from one node. So how do I get to that node starting up here? Well I've got to resolve this one. I've got to resolve that. I've got to resolve that. And I can't jump. I can't do anything in parallel. I have to resolve everything before I get there. So we've got to watch out what we're doing. And this is I think one of the biggest challenges to the functional programming community is so many of the data structures are built on link list and tree-based structures. Because how do we achieve immutability? We do a thing called path copy all of the time. And for example, if I wanted to change something down here, what I have to do is I take this tree, I create a new version with a new root. I can reuse a lot of it, but I've got a path copy from the leaf back to the root, replacing all of those nodes. And now I've got to reference to immutable data structure that I can use for that. So this is kind of cool. But it gets a bit worse than that. Ah, what's wrong with this thing? Isn't it working anymore? The Wi-Fi just stopped working on my thing, and as a result, it's locked my machine up. So I'm going to have to go to this instead. So if we do the path copy stuff, we end up with this. So I create the whole thing from top to bottom. And if I do that, I've got this interesting challenge of concurrently. The typical technique is you go from bottom to top, and you cas in, you do a concurrent swap of the top node to replace that node, and now I've got concurrent access to that, and it's safe and it's immutable. But the problem with that ends up being is if that fails, because another thread has beaten you, you repeat the whole process over again. So you start at the bottom, you copy it right up to the top, you cas it in, and it will work. Now go back to universal scalability law at this point. You use universal scalability law. You've got the contention penalty of building that up, and then you've got the coherence penalty of getting an agreement. The more threads you've got doing it, the more you repeat that process. Ten threads go to it at the same time. One of them is going to succeed and win. The other nine are going to fail, and have to do it again. And of those nine, one of them is going to win. Eight of them is going to fail. We've got this really interesting problem. You see the math unfolding here. It's a really difficult thing to do. So you end up with this kind of interesting costs of what's going on, and you also end up with garbage collection hell, because all of these nodes have to be allocated. They've all got to be collected again afterwards. So this becomes a difficult and interesting challenge. If you build these things, you end up with this sort of interesting concept. So in the UK, people love sausages. These are things... This is as horrible as you can imagine to a vegetarian culture.  And they are really quite gross. Many people like them as tasty, but they're really not very nice if you understand anything about them. I've kind of got an interesting way of thinking about this. And if you get into functional data structures inside, think of them a bit like sausages. They may look beautiful on the outside and they may taste nice, but the more you know about how they're made, you really don't sleep very well. I've built a lot of these structures inside, so sometimes people are using this nice, beautiful facade, but you really don't want to see what's behind there. Actually, E6 is a really good example of this. So you've got to be aware of what do we do and how do we do this better and stuff. So one of the really interesting techniques that's available now are CRDTs. These are our different conflict-free resolution and replicated data types. And there's some great ideas in this that we can use for concurrency. So what I want to look at is, how do we take some of the concepts from this and how do we take some of the other nice functional concepts and build something that performs but also sort of is given as good behavior underneath, but nice and easy to reason about. It gives us all the benefits of functional programming in this space. So there's two major types of these. You'll find one is operational type and they're known as the commutative replicated data types. You see that the C small m, RDT. The other type is the state-based ones are the convergent types of these and these are the convergent-replicated data type. What's a little bit more detail on these and what are the good properties we can have? Well, of the commutative ones, you need to replicate operations. So imagine I wanted to change the structure. I can send an operation like decrement 10 from a value, increment 10 to a value and if these all arrive at an end point, you will eventually end up with the state changed at the other side. The thing is they all must be commutative operations so I can send a plus 10 and a minus 10 doesn't matter what order they arrive in, we'll end up with the right state. This is a kind of really nice feature. But the thing is they can't be idempotent. So we can't apply the same thing multiple times. So if I'm going to build a data structure to go to the network, I can't really do that. We need to have an underlying reliable transport. The other ones are kind of interesting. So this is what we're going to replicate the state from one structure to another. We can use this for concurrency, we can use it for distribution, but we have to replicate the whole state. The interesting thing is the state must increase monotonically. It must be purely increasing monotonically so it's a pand only. The problem with that is if you need to do a removal, you don't need solutions to that. It's a tombstone and I'll show an example of how that can work. And when we do this, we need a merge function and that merge function must be associative at this stage. And so if you're going to have idempotent, we've got to deal with that and we've got to deal with the conflicts. The really nice thing is some of this can be dealt with at a lower level if we deal with deltas and the deltas is a good way to go. So how did I build something like this and bring these techniques together? So Aaron's an example of this. It's not really a sales pitch bird. It's about how do we take the ideas and how do we apply them. Well, one of the concepts I want to do is apply that systems engineering thinking. I've got to ship messages from one machine to another. I want to respect the hardware. I want to respect the data structures. I want to respect the properties of the network. I want to work together and come up with a good result. And the log buffer is one way of doing that. So I want to have something that goes through memory as a nice bigger rare function. I don't want to look at it in random patterns. And I also need to be able to deal with it concurrently. So if I have a file and that file contains the header for the message followed by the message body and a tail for words next, I can grow the state monotonically. So I can add in messages. But there's going to be multiple steps to that. So I need to increment the tail. I need to copy in the message. I need to apply the header. And if I do that, I can move forward in a sensible means. You may say, well, one big file that goes on forever, that's the way a lot of the academic research goes behind this. I keep finding these interesting sort of views that you read academic research papers and they don't work in practice for lots of very practical reasons. And one of the practical reasons with this is it doesn't work because of things like pagecast churn, virtual memory pressure, all sorts of issues. We are constantly allocating those. So how do we deal with that? Well, if you do the sort of good old technique from backpacking where you wash one, wear one, dry one, and bring it around with you, we can reuse these and go forward. So if I've got a clean buffer, I've got a dirty buffer, and I've got a currently active buffer, I can continue adding and use them over a period of time. Where some of these ideas come from is anybody familiar with the guy called John Carmack who started ID Software, Quake, Doom, all of that sort of stuff. He wrote the original games engine in C and then he immersed himself in functional programming and he liked a lot of what he found. He rewrote the whole thing in Haskell and then he learned a lot from it. It took him maybe 18 months and so he really just immersed himself properly. When he came back from it, he realized there's really good elements of both. One of the things he wanted to do was bring the immutability because it's a highly parallel, highly concurrent problem with games and immutability really helps with that. But if you just try a pure immutability approach to it, he discovered that it didn't work and it didn't scale. The garbage collection pressure, the management of that just become totally unpractical. What he realized is if you limited over periods of time, you can have immutability within a time frame and then start over again. The functional to a point had a checkpoint. He would go to be an imperative, change the state of the world so he could start again with a clean slate and he did this by using the frame-to-frame within the game. I stole the idea from it and done it buffer-to-buffer and by taking that, I was able to have this nice immutability within the buffer but once I reached the end of the buffer, I'd flip over and there's an imperative technique to do that and then I continue again. Sometimes it's not just one or the other, we'll blend the techniques together. How do we do things like concurrent publication into something like this? Well, I don't want to have locks. I want to have something that works well with universal scalability law. What do we need to care about? Well, let's say I have two threads racing to put messages in here. I could lock the structure. I could put in what I need to put in and then release the lock on another thing. I could have a contention penalty and I've also got a large coherence penalty because handing locks off are quite expensive. There are many microseconds. What can I do that cuts down the contention and coherence penalty? So contention penalty, I want to do the minimum under contention and with the minimum I can do is just increment the tail character. One message has incremented it, the other message now has incremented it. That is the only contention penalty and the coherence cost of that is a single cash line between processors. So we're down to very small amounts of time. Now then in parallel I can copy in the message completely independent of the concurrency window that we need to care about. The really hard case here is I've actually reached the end of the log and I've got to deal with rotation. The one that's reached the end can be responsible for just filling in the log and rotating to the next and putting in a message again. Looking at the contention and the coherence penalty, pulling them apart and fixing your algorithms to do with that. No locks, no complexity and we're able to go forward and mostly because it's a monotonic function that gives you the beauty of doing a lot of that so we can put it together that way. You may say, what's in a header? How do we get this across to another machine? Well, our header, sort of typical ITF porn here where we lay out our header with the different fields with what's in the message, the length of the frame, the version, some data to rebuild the structure on the other side. Merging the two together becomes really interesting. Well, we've got to look at what happens here. So what if a publisher dies mid-operation? So the previous case is I could be putting something under the lock. If the lock fails, I can revoke the lock and I can continue forward. With this being concurrent, in fact, even across processes with no coordination other than what's in there, we need to have a protocol and protocol says how we interact quite nicely. So the way to do this is if I'm going to write the frame, I can't write it all atomically but I can write it in an ordered fashion. So first of all, I can write the length. I write the length negative to begin with. So if this is going to be 100 by frame, I'll write minus 100. I then fill in all of the rest of the header. I fill in the message body and I say I'm done by flip negative back to positive. By putting in the negative to begin with, if this fails and I need to go in and fix it up, I know the size that's been reserved because I've got the absolute value if I take the absolute of it by reversing the sign and flipping the sign at the end is a really nice way of dealing with this. So now I've got around the different laws that I care about. And well, how do we end up with the removal in a failure case? So let's say I put in the frame length here and it's negative. If this thread crashes, it's a process that crashes, what do I do going forward? So if you think of the Erlang world, we just let things die, but we clean up then. Well, I fill in the type to say this is actually a tombstone and I flip the length back at this stage. And so now we're going to have monotonic state going forward even on the buffer that's in there. And that gives us what we need to do. We replicated messages to another machine and we go forward from there. So as the messages arrive, we copy them in on the other side. So copy in like the first message. The header contains all the information for where it needs to go. If something arrives out of order, we just copy it to its location in the buffer at the other side because the header says what is the offset it starts at. We don't need the trees. We don't need the skip lists, the scoreboards, anything like that. Then another message arrives out of order. But notice there's two characters. And the high water mark. By having those two counters, whenever they come together, we know we've got a complete log. If we don't have them together, we know we've got a gap, we've got loss and we deal with it. So just protocols. Very simple ways of dealing with this. And this gives us something that's strongly eventually consistent and a nice way of putting it together. Now, what's interesting about this is consider the memory layout. The memory. That will prefetch. It'll work really well. It'll vectorize with our modern processors. So we've got to go through these things. We can apply a lot of really interesting things. Like I can apply searches that are monotonic functions across here to see many different states. Most of this just becomes mathematics and how I deal with it. Very little branching. Just looking for values. It's all just math and how it applies. It's been around for a long time, just not applied. Like the APL folks got a lot of this right a long time ago. And a lot of the industry has just kind of ignored what's going on. So again, we can steal lots of cool ideas from other places. And so, how do we get to the states where we reason about all of this? And this is another beautiful thing about the monotonic functions, is everything that we have. Like if we've got publishers, we've got senders, we've got receivers, and the counter is the latest version of state that they've ever seen. And that way we can see progress right through the whole system. You can track it, you can debug it, you can deal with it in really kind of nice ways. So kind of wrapping up here now and closing, so reaching the interesting part. We could all kind of agree that shared mutable state is evil. Is that reasonable in this room? Is it gonna... I think it's a kind of fair thing to say. So we want to avoid this. We want to avoid what we learned. What can we do to avoid this? Well, if we are going to share processes, we start looking at sort of the different laws that I've talked about, is if we must update, we should only ever have single writers. If we've got concurrent update to anything, we're in the world of shared mutable state, and it's hell, and it's not nice, and we need to deal with it in another way. And the easy way we can start thinking about that is having, if we must share a process memory in some way, we'll only have one owner of it from a write perspective. Many owners from a read perspective, and we can share. How can we have then multiple processes or threads or whatever updating that? We'll send a message or send something on a queue to the one that updates it. It can update it with whatever type of structure it needs. Then it becomes nice and clean. We can hide all sorts of ills provided we only have to update it in one way. Once you get updated concurrently, it becomes really, really difficult. The other way to better think about this is to start thinking about shared nothing. So you get a little bit of a flavor of different structures and how we need to think about them. If we do not share them at all, we can do whatever we want. We can have things in different ways. So the whole idea of the shared state we need to get away from. We need to have our own local state and with our own local state we can use whatever techniques, whatever we want and look at messaging. So I've spent a lot of my career looking at messaging and developing messaging systems to deliberately get the isolation. This is a really, really important thing. So we've got many languages where we're sharing memory and by sharing memory we're difficult. That gives us issues for garbage collection. It gives us issues for what types of structures we have. It gives us issues for failure detection. By putting the evilness of the sausages into the communication mechanism. So if there's one thing I would say to the underlying folks is you got the stuff right from a high level. You really need to invest in your messaging infrastructure. So it is super fast, super efficient and sort of obeys all the right properties to let this stuff work really well. And we build protocols on this. The secret to so much of it to work well is we've got to look at building things with increasing monotonic state. If we do that it becomes so much easier. We don't go backwards, we always go forwards and we tombstone if we need to deal with that. If you want to see some examples of encode have a look on Aeron. Come to the workshop tomorrow then I'm going to be giving. And on that I'll thank you very much and I'll take questions. Think I've left enough for some time. Previous slide.


Welcome to module 40 of chemical kinetics in transition state theory. In the last two modules, we looked at a theory called RRK theory to look at rate constants calculated at constant energy throughout the course we have been looking at calculating rate constants at constant temperature. Now, we have been asking the question what if we have a different ensemble where the energy is constant not temperature. In the last two modules, we looked at a simple model which we call as the RRK model. Today, we will do extend that model and fill in the deficiencies of that very simple model. The model that I am discussing today is called RRKM model which is Rise-Ramperger-Casel and Marcus. So, what I am teaching today is there in Steinfeld-Francisco and Hayes in chapter 10.7. I have also given you the original reference for those who are extra interested. So, the history of this work is as follows. In late 1920s, 27 and 28, these three authors Rise-Ramperger and Casel formulated this theory for unimolecular decay. They were trying to understand if a molecule is decaying at a constant energy. How do I calculate the rate constant and match the experimental data? And so, we studied their efforts in the last two modules, but that actually does not work well and we discussed that as well. That is a very simple model with a lot of deficiencies. Enter Marcus. Marcus is truly a pioneer in chemical kinetics. This was, he was doing a post-doc with Rise actually of this RRK, the R of RRK and he was actually before that doing some experimental work. But Marcus was a genius and before like when he joined Rise as a post-doc, he started looking at papers for the last several decades. He just started reading and reading and reading. And finally, Rise and one more person, they gave him this problem. You know this several decades ago in 20s, there was this problem of unimolecular decay that never got resolved, you know. We do not know how to deal with it. Marcus, it took him basically only a few months and he solved this problem. And he published a few papers, one I have cited here in 52. He published a few more papers in 53 and that is it. After that Marcus changed his field and he was looking at electron transfer for practically a good portion of his life. But these few papers he published are authoritative works. They are the final word on this subject on unimolecular decay. And even today, you can open any physical chemistry journal. There will be at least one paper that calculates rate constant using this RRKM theory. So, let us study what Marcus had proposed. So, we will do a quick recap of what we covered in a long time ago in module 27. We wrote an expression to calculate rate constant at a given temperature earlier. We integrated over dividing surface over momenta. This is the density, this is the transmission factor that we have discussed for some time. And this is the finally, the flux. Transition state theory assumes this rho to be the thermal density, that is the Boltzmann density. And for chi, we put chi equal to 1 if P1 is greater than 0, otherwise chi equal to 0. We put a very simple expression for chi. And if we assume that we can derive transmission state theory, this is the expression we get out of it. Excellent. We are going to essentially follow this approach now. So, this was really the genius of Marcus. This since I am presenting in this fashion now I have told you the answer. It might look trivial, but it is not. When you have a flurry of ideas, what is the right way to think about it? What is the first equation to write? That is the question and that shows the geniusness. And Marcus said, so I will write the same expression. Perhaps I have to just use different values of this rho and chi. So, this rho earlier was for at a given temperature. So, now I must use a rho at a given energy. And what he said is, this is then equal to a delta function. H of x comma p is the Hamiltonian, which represents the energy. So, I am saying that rho at that given energy, this Hamiltonian must be equal to that energy. And chi we will start with the same as transmission state theory. Transition state theory after all is very successful. So, chi is equal to 1 if p1 is greater than 0 equal to 0 if p1 less than 0. So, that is going to be our starting point. This is the expression we want to simplify. So, we have changed a density from a temperature density to a energy density. I have made a mistake. So, let me correct my mistake. They should be normalized. Remember that even in the previous slide our rho t was normalized. We had this full integral there. So, we must write a similar integral as well here. That integral will now be dq dp delta of h of x comma p minus e. So, this delta is essentially constraining those x and p points for which the Hamiltonian takes a value e. So, the energy of the system is equal to whatever I want it to be. So, just sorry I had put in this nice animation that I had forgotten. But I have written what this rho is supposed to be. This is supposed to be e. Let me give you a little bit of properties of this Dirac delta function. This function here is called the Dirac delta function. So, this can get into very deep mathematical details. But I am not going to go into that. We are going to study only a few important properties of Dirac delta function. First is what if I integrate Dirac delta function multiplied by some other function. And let us say I am sorry let me write this as x naught and integral from a to b. This is equal to f of x naught if x naught lies between a and b equal to 0 otherwise. So, the Dirac delta function can be thought of as 0 everywhere. Sorry let me write delta of x minus x naught. And it takes a very, very large value at x naught. So, it is 0 everywhere except at this x naught where it is blowing up. So, one other property I can write is if I integrate over all space then I get f of x naught because well x naught has to lie between minus infinity to plus infinity. And one final property that we will use today is that Dirac delta function is even which would be obvious if I invert it I still get the same function. So, Dirac delta function is even. So, before we move forward actually this expression here is much harder to evaluate than what we had for constant temperature believe it or not. Because of this Dirac delta function it is not easy to deal with this because this is h couples all this q a and p. So, it is not easy for me to simplify the integral over dp1. Earlier we had e to the power of minus h that I could separate out the p1 term and integrate it out separately. So, it is a slightly more complex. So, I will have to introduce a little bit more language or few more terms added to my language. So, that I can simplify this expression a little bit more. So, I define two quantities for me now. One is called g of e which represents the density of states at energy e and w which represents the total number of states with energy less than e ok. So, if I am at a given energy e how many what is the density of states? How many states per unit energy are present at that energy that is g of e and w of e is the total number of states that will be there between 0 to that energy e. So, what I can do is start writing expressions for these g of e is then given by an integral over dx integral over dp and delta of h of x comma p minus e. So, I integrate over all space all possible configurations of x and p and I find for what values of x and p is my Hamiltonian equal to the energy. So, that will give me the density that will tell me how many states per unit energy are there that is what delta is doing ok. So, that you can think of as the definition of g if this is the density of states and I want to find a total number of states between 0 and e well that task is simple. I must integrate g between 0 and e g is telling me the density at that given energy. So, if I want go from 0 to e and integrate it out I will get the total number of states I write this and as a consequence I can also write g of e equal to dw over de. So, if I differentiate it dw over de you see that I will immediately get g of e ok alright. So, let us look at this expression of w little bit de prime g of e prime well let us put in the expression of g it is dx dp delta of h of x comma p minus e let me switch around the integral sorry little bit. Now look at this function what do we get this is equal to 1 if h of x comma p sorry this should be e prime is less than e equal to 0 otherwise agreed that is what this thing says. So, if h is less than e then I get 1 otherwise I get 0 well what does that mean imagine a graph of x comma p since I have a 2d screen I can only make 2d plots. I have imagine some contour lines or at given energy this is let us say energy e 1 contour line e 2 energy contour line e will have its own contour line I am sorry if it is not e 1 it is e. So, this function this function that is there is 1 if I am inside this contour f is 1 here ok where I am calling this whole thing as a agreed outside I have f equal to 0. So, all I am doing is integrating over all x and p which is completely covered by this contour line. So, this is nothing but the volume or the area whatever word you want to use of the contour equal to e. So, I look at this contour for h equal to e in a higher dimension you will get this high dimensional surface and I look at the volume enclosed ok. So, let me just say volume enclosed. So, that is the physical interpretation of W. W is the area or volume occupied by phase space and closed by this contour line alright. So, we will do one example we will calculate G and W for a 1d harmonic oscillator ok. So, my Hamiltonian I have only 1d actually I have made a mistake let me correct my mistake I had forgotten my factors of h remember this is an integral of x and p and an integral of x and p have dimensions. If you remember our discussion on partition functions I have h to the power of 3n that is what I had forgotten to write. So, let me correct that. So, this becomes a true density I do not have any factors of h floating around. So, we divide by h to the power of 3n just like what we did in partition functions ok. So, I apologize I had forgotten that let me correct all of these things here as well. I will have this divided by h to the power of 3n here as well h to the power of 3n here as well. So, volume enclosed divided by h to the power of 3n. So, volume in units of h to the power of 3n to that minor correction. So, the Hamiltonian for a harmonic oscillator is this. So, if I have to find w I have to find the area enclosed by the contour line. So, let us say this is equal to E. So, I have to draw the contour line for h is equal to E yeah and find the area enclosed by this contour line. So, you see this expression this is actually an equation of an ellipse. So, I will rewrite this slightly in this fashion. You notice let me get my energy also in here. So, let me correct that. So, let me put my energy also in the denominator because I have done nothing I have just reorganized it my equation here and make it look like a equation of an ellipse. So, an ellipse essentially looks like this where this is A and this is B. So, for me A is equal to 2 E root 2 E over m omega square and B is equal to root 2 Me. So, I know the formula for area of an ellipse. So, the area w of E will be nothing but area divided by h I have only one dimension here. So, h to the power of 1 is equal to pi A into B divided by h happily mass cancel. I get root 2 E into root 2 E which is 2 pi E divided by h omega well I will get E over h bar omega where h bar of course is h over 2 pi. You start seeing some good expressions do not you h bar omega is somehow related to harmonic oscillators quantum mechanically. So, let us move forward let us see what we get. Now g of E is nothing but d w over d that d E. So, this is equal to d over d E of E over h bar omega which is equal to 1 over h bar omega. So, the density of states is 1 over h bar omega just think of quantum mechanics. Quantum mechanically the energy is given as n plus half h bar omega right we get equal spacing like this quantum mechanically. So, what it means is even quantum mechanically what is the density of states I have one state per h bar omega energy that is what this figure really means if I look at one quanta of h bar omega I will have one state in it which is also what I get classical. So, that was a little aside. So, now let me finish the proof of transition state theory at constant energy now that we understand this g of n E and a little bit of Dirac delta functions ok. So, we start with the expression that we wrote earlier. Let me just clarify a few things from earlier integral over dividing surface b q is nothing but it is shorthand notation for b q 2 to d q 3 n h T s of q comma p is nothing but h of q 1 equal to q 1 dagger and all other variables are varying as they wish ok. So, this is just shorthand notation just to keep my life simple nothing more ok. So, first let us look at what we had in the denominator we had this you now we have defined this g as a density. So, we quickly notice this n is nothing but g of E into h to the power of 3 n ok. So, my k becomes 1 over h to the power of 3 n g of E into all this integral d q d p 1 d p 2 to d p 3 n and delta of h minus E into p 1 over what do we do next? We are actually going to use the same set of approximations as we have used for deriving the transition state theory at constant temperature. So, the next assumption I am going to make sorry is h T s is separable.  So, again that is also what we assumed when we were doing transition state theory that the same thing we do now all right. This is nothing but E a. So, what we get I get these constants out g r of E one thing I had forgotten to mention this n that I am calculating is only over the reactant Hamiltonian just like we did in transition state theory. So, I write for that only g r ok just to signify that I am integrating only over the reactant side and not on the product side ok. I have still this giant integral that takes me 100 minutes to write d p 2 integral of d p 3 n delta. Now h I will expand h prime as a function of all this minus E have we achieved are we really achieving anything let us see. So, we get this big expression now we will do a little bit more mathematical jugglery just a little bit of focus focus we will transform our variables now. I am going to define an E dagger as E minus p 1 square over 2 m minus E a ok focus focus abracadabra. So, d E dagger is equal to E is a constant remember I am calculating everything at that energy E minus p 1 over m d p 1 E a is also a constant. So, d a dagger equal to this. So, this is the one I am looking at you see p 1 over m d p 1 here I get the same thing here that is why I did the transformation. Now if p 1 is equal to 0 E dagger equal to E minus E a I am trying to find my limits ok. What is the maximum value E dagger can take? Note that I have a delta function sitting here right. So, I claim the maximum value of E dagger is the minimum value of E dagger is only 0. So, imagine I have my reaction coordinate I have E here this is E a this here is let us say p 1 square over 2 m this is then E dagger. So, E dagger is E total energy E minus E a minus p 1 square over 2 m. So, E dagger cannot be less than 0 ok why because I have this Dirac delta function sitting here h prime is positive. So, if E prime is less than 0 this Dirac delta function will immediately become 0. So, I will anyway get 0 ok. So, what I get here is then 1 over h to the power of 3 n g r of E dividing surface d q. So, this integral becomes E minus E a to 0 I notice this thing is minus d E dagger integral of d p 2 to d p 3 n that I am not touching into delta of h prime minus E dagger. I take this integral I play around with it a little bit I take this minus and invert the limits integral over dividing surface d q integral from d p 2 to d p 3 n delta of h prime minus. So, let us just look at this expression what is this equal to you note that let me erase a little bit stuff here out of space. So, I am just erasing. So, I notice that this integral is nothing but g of E ok. So, this is then equal to 1 over h to the power of 3 n g r of E integral from 0 to E minus E a d E dagger g of E dagger of E dagger. I have put a little bit dagger here sorry this is supposed to be g E prime it was something is not ok I am sorry I am getting confused myself happens with me. So, I will correct it all of it down I am and I have put a little dagger here to denote that this integral does not involve integral of q 1 and p 1. This is an integral from q 2 to q 3 n and p 2 to p 3 n ok look at this it does not involve integral of q 1 and p 1. So, that is why I have put a dagger here to remind you of that and I look at this integral and I see this. So, this is nothing but h to the power of 3 n I apologize again this I should multiply by h to the power of 3 n minus 1 because I have this factor here ok. So, I have this integral and this integral into h to the power of 3 n minus 1 will give me g. So, I get h to the power of 3 n minus 1 into w again dagger of E minus E a. So, that is my integration limit here ok. So, at the end I get w dagger E minus E a divided by h into g r this E minus E a because of this limit. So, whatever is the limit here comes here that is why I put E minus E a w dagger again denote that the integration is only from q 2 to q 3 n and p 2 to p 3 n ok and this factor of h 3 n minus 1 immersed because I had a division by h to the power of 3 n here. So, this is really the final expression for the micro canonical transition state theory now. This expression looks like w dagger of E minus E a divided by h into g r of E and the list of assumptions is very similar to what we had made earlier transition state exists. Nuclear have been treated classically we are integrating over q and p there is no recrossing. So, the chi that we choose is the same as before. What we when we write this delta function what it assumes is that all energy states are equally possible. So, I am not discriminating between two points in a space space having the same energy they are equally possible ok. So, that is called air body city it has profound consequences to thermodynamics and statistical mechanics I have listed it here and final assumption is that Hamiltonian is separable in transition state geometry. So, following the same set of assumptions we derive the expression for the transition state theory at constant energy. Thank you.


After the season ended, you moved very swiftly to sign CeCe Sabathia to a one-year contract. Why was that so important?  He really is one of the best starters in the game in inducing weak contact. You know, I think he's going to provide valuable innings. And, you know, you know what you're going to get from this guy. He's going to give everything he's got. He's a great, great leader in that clubhouse. And so I built that he's going to provide a lot of value. And if we could thread the needle in a proper way with someone who wants to be here and finish his career here, it was the lane I wanted to work in. In addition to Sabathia, you also re-signed Brett Gardner after not picking up his option. He struggled in the second half of last year, lost his job to McCutcheon. What compelled you to want Gardner back for 2019? You know, in Guardi, again, we know what we got. He's an elite defender in one of the game's bigger left fields in baseball. So there's a lot of value there. He's a gamer. I know he trailed off in the second half. I do believe that we kind of, you know, were forced to overplay him a little bit.  Now I can't remember off the top of my head. So all those things conspired. And then with Stanton's hammy, too, keeping with the DH role that he fought through, it all conspired to us, have to run him out there more than we really wanted to. And I think, you know, his offensive numbers paid the price there. But I know the player. We know the player. He's a true Yankee. But we're not here giving things away, you know, at least willingly. We are investing in people that we think, you know, are worth it. And I think, you know, going forward here, Brett Gardner still has a big role to play as he's played in the past. So we're excited that we got him back. All right. So, Jack, let's talk about that. Last season, 609 played appearances for Gardner and 140 games. It sounds like they'd like to use him less, which probably wouldn't be such a bad thing. Yeah, they would like to make sure that he gets a rest every once in a while. We heard Brian Cashman refer to that. And I think it's been a bit of a topsy-turvy time for Brett Gardner. We see how he started out in the first 51 last year and what happened after that. But let's go back and refresh everyone's memory. He loses his job to McCutcheon. And there were some people, myself included, who you watch McCutcheon and the way that he works at bats and his on base percentage. And you wondered, would the Yankees make a play for McCutcheon after the season? But the Yankees are content with Brett Gardner. They like what he can provide for them. And if you look at their outfield the Lyman, it's judging right. It's Hicks and Center. You're probably going to have Gardner left a lot of the time, especially at Yankee Stadium, as Cashman just referenced. Because you want to make sure Stanton doesn't have to play all that time in the outfield. They used him a lot as a D.H. And I think they're comfortable doing that. And they're hopeful that Clint Frazier will be completely healthy. They don't know that yet. And they don't know what Jacobi Ellsberg is going to be. Yeah, they would love for Clint Frazier to be completely healthy because they're high on him. We've seen the bats speed with Frazier. We've seen the athleticism. We just haven't seen him get the kind of bats consistently that the Yankees would like to see him get. And then as far as Ellsberg's concerned, right now there's a question mark hovering over his head. He has two more years left with the Yankees, over $40 million. But we already know that the Yankees have shown some interest in potentially trying to move him. They talked to Seattle about a canoe and Ellsberg swap. And those discussions didn't become substantive or very serious. Again, reminding everyone, Ellsberg's got no trade situation. So he would have to approve any kind of deal. You know, Brian Cashman talked about knowing the player, could say the same thing about Cece. You want a guy, you don't want to take a flyer on a guy for a fourth or fifth spot in your rotation. You don't know if he can pitch in New York. You don't know quite how he'll handle it. They know everything about Cece. Bob, every time you and I do a pre-game show and we talk about Cece's abathion, what to expect, I say almost the same things. I feel like I'm a broken record and there's his resume. If he pitches the way that he needs to pitch on any given night, he can stop anyone. I mean, when he is throwing that cutter inside and the sliders and the change-ups away, he's getting swings and misses. He's getting soft contact.  But he can give you 150 innings and he can pitch to a three and a half ERA. And he can provide leadership in the clubhouse. Those are some very important things to have back for 2019.


to Inside Leather History, a fireside chat. I'm Doug O'Keefe and I am the host and the co-producer of these chats with Mistress Joanne Gaddy. The fireside chats are a program of the Leather Archives and Museum. Today I'm sitting down for an interview with Auntie Kaupinen, who is the ECMC Secretariat. He's a Leather and Fetish activist in Helsinki, Finland. How are you, Auntie? I'm fine, I'm fine. Very good. Well, let's go back a little bit. Please tell me about your growing up, a little bit about your family, where you're from, so that we can understand you a little. Okay, so I'm from quite original middle-class family from Helsinki City. Yeah, I went to the College of Performing Arts, so I have this sort of an artistic background, and then I started to do cultural science and cultural philosophy studies, and I have been living quite here and there. I've been studying in St. Petersburg and in Hong Kong, and I have been traveling. I was also in Los Angeles in the Tomofiland Foundation as an artist residence, and I have been doing quite so many sort of things going around, and that's the reason why I'm also active in the more wider LGBT things, not just in Finland. Why did you study in St. Petersburg and of all places, why Hong Kong? I just wanted to get out from Finland, that was my first thing I wanted to go, and I wanted to go somewhere different. I didn't want to go to any similar place. I found it very interesting, and St. Petersburg was in 99 when I moved there, and I actually ended up living there for seven years. So it was really interesting times. It was the times when just a year after I moved out, the first anti-LGBT laws were introduced, but back then, when I was living there, there was still a possibility that it could have gone through the other direction, but it didn't go. But they launched interesting new trans laws, which were quite advanced back then, and so on.  How was the gay scene that you knew in St. Petersburg? Well, it's a huge CC people of five, six million people, so obviously on the city of that size, there is always a gay scene, whatever happens, whether it's in Saudi Arabia or wherever. So I was quite nerd back then, and I was just reading and quite monogamous in my perspective, and quite reading poems and being very romantic. So that's how it's gone. But no, I was quite okay to be in more of a vanilla situation in my life back then. I did an interview with the late Alexey Khrachev, and he spoke about the kinky scene and the leather scene in St. Petersburg. It was very underground. Did you experience any of that while you were there? No, I didn't think so. No, but I didn't experience it anywhere. Obviously, I remember when I was probably, I was like 13 or something, and I saw Tomofinland cut this award, this national award of comic drawer, and his drawings were in newspapers in Finland. So I remember, I saw them, I was actually in library, and I just immediately ran to the toilet in the library to have a van, because that's what you do when you see naked guy with leather, so on. So there was obviously these sort of tendencies going on already when I was quite small, but I didn't, I wasn't looking for them. They weren't something that I was interested in when I, in my 20s. Tell us a little bit about your coming out, about your journey with all of that. Yeah, well then I, little by little, I just, MSC Finland, Tom's Club is the club that is, it's my fetish home, so I knew that they had parties, and I went there, and obviously there was this whole brotherhood feeling about it, and also the sexual tension, like the feeling of leather and the warmth, and the smell of it, and so on. And through that, it somehow opened. But I was in my late 20s, so it wasn't something that happened when I was like, except those first drawings of Tom of Finland that I went with in the library toilet. But like, after that it was, yeah, I was probably like 29 when I started to realize like, ah okay, this is the direction I actually want to go with my sexuality. How did you discover that section though? Well, I'm from Finland, and we have the phenomenon of Tom of Finland, so like, it has always been there, so to realize that you are more drawn to the fetish side of the vanilla spectrum, then yeah, like it's so visual and existing in Finnish, like visual culture and in the talk of art in Finland, so yeah, everybody knows about Tom of Finland in Finland. Well, since you have brought up this topic, some people would love to know how do the people of Finland see the images that Tom of Finland created? Because is it different from what we would think about it over here? I don't really know how the people of Finland see it. Okay, I think there is a huge difference between cultures that see, like, what do you see sexual upreary? Like, for some cultures it's touching, and for other cultures it's nudity. Finland has this whole sauna culture, so it's normal, like I have been a sauna with my grandmother naked, and like there is no, like it's not weird, it's not even nudity, it's on being not naturalistic or what is it, nudist or anything like that. It doesn't have any sort of conversation, it's just being normal without your clothes on. So seeing a picture of a person nude isn't sexual for our culture, as it is for many other cultures. Then again, touching, like we have really huge differences, as I showed at the beginning, like that we are now going back from the two meter COVID restrictions to the normal being three or four meter apart. So touching is way more sexualized in our culture than in, for example, southern European cultures. So I think this is something that you need to put to your head, this idea that it's normal to be outside, happy, smiling, be with your family, running to the lake from the sauna or jump to the water, like this whole thing doesn't have sexuality or sexual connotations. So when you take Finland's pictures and you see negative or half-negative men smiling at each other, being fun, having fun in the forest, what most of the western cultures see is something sexual, but for us it's the skies being having fun in the forest. There was in 1920s or 30s, or was it 1932, Finland had a postmark that was a woman, naked woman stepping outside from a sauna facing the picture, and the postmark was restricted not to go abroad because there were countries that thought that it was pornographical.  So this is a huge and long and quite cultural, scientific explanation, but so this is something that's completely unique and different for the Finnish perspective. Then at the same time there is quite a lot of studies now being done about how in Finnish culture sexuality has been seen and we have the biggest collection of traditional poems than any other European or Chinese or any other culture and none of them has the poems of transsexuals or LGBT minorities in general. What does it mean? If it would have been restricted, illegal, somehow disgusting, there would be some sort of traces that they were restricted from the collection, but because it wasn't done it has been interpreted that it wasn't a problem at the time. So in the beginning of the 19th century when the poems were collected being queer in any sense of it wasn't important to the culture of Finland and then in 1920s when this sort of a more scientific and to say straight from Nazi Germany ideologies of straight and gay and male and female were introduced also to Finnish culture, that changed the system. But we can say that in the childhood of Toko Laksson and Tomo Finland he was living in a countryside society where still he you could see that being gay or being butch woman or whatever wasn't that important. So also there is this idea and that's how I interpret that Tomo Finland was born in Finland and came from Finland because of the weird idea that we have that nudity isn't sick or it doesn't have to be sexualized and also being from a weird Finnish culture that being gay or being queer isn't as important as other aspects of life like working hard and that sort of things. So I think those are the things that made his art and then in 1960s 1970s when the queer visuality was still quite restricted it was always behind the curtains and there was really the contact with the characters so his pictures were new and yeah came from different place from Finland. What were your thoughts about the movie? I think it was okay, yeah I actually liked it, yeah. Do you feel it was accurate? Well I don't know, I talked about with his other sisters boy and they told that Tom was totally spot on and also his boyfriend but then the sister how he was pictured like he they thought that it was she was quite fictional but the family felt that Tom and his partner were really spot on. Oh very good to hear it, very good. Let's take one step back a little bit. You mentioned that you didn't go into the leather scene until your late 20s.   It was who you were and it was the world where you belonged to and it was never I'm really blessed in that sort of way that I have never been surrounded with people who would be against it and I haven't had like my brother or father or mother like they have always loved me so I have never had that sort of problems as quite many people have. What did you find fascinating or shocking or intriguing when you entered the leather scene? I think the camaraderie and the whole brotherhood thing which I think has probably been in other forms of queer culture back in the days but as things become more mainstream those aren't anymore that tangible in most part of LGBT like surroundings but yeah I think that's quite interesting otherwise no like nothing shocking really. I remember when I started actually in then 2015 I started to write the 40 years anniversary book of my club and I remember I just found this old old no just all the members of our club's club and then I went and interviewed one guy who was in his 80s back then and then like he just we were having coffee and he started to discuss about about the peace parties back in 1960s and like being just really outspoken and relaxed and okay about it I remember we were like okay yeah here we go okay so this is the part of the history but like yeah like I love them I love the fact that how and especially the older parts of our club the journey that they had to do to become okay with being who they are has made them so powerful and so that it's yeah it's quite empowering to to speak with them.  I'm quite surprised by the fact that there is no difference like it's it is like it's super same everywhere like I I didn't know how can it be because like then again in the in the more vanilla gay scene there are already cultural differences but in our scene I think like we are all the same it's it's quite unbelievable to realize how how similar to the even the problems in clubs are similar and and everything so it's yeah it's surprising. But how about differences between Helsinki and Berlin or Helsinki and London or Chicago? Yeah I think it's the size because Helsinki is anyhow a smaller city than any of those so so yes the size is different but like yeah like I don't know there is something anyhow when you are a minority inside of sexual minority you know whether how big your your association would be you still have gone through quite a lot of things to be okay who you are way more than the standard vanilla gay so so people are quite open and when a person is open it's quite universal in a really beautiful way. What were your thoughts how did you feel about the Toma Finland Foundation in Los Angeles? California has been quite elementary in in in many ways in in our history so it was really interesting to see those those parts also and obviously the southern Californian people they are they are hippies in so many ways and they are lovely but it's like they have their own concept of time and all that so it's wonderful to be there but trying to do some process with them like from from somewhere else it's always a big difference but yeah I really love them and it was like really lovely place to be and again this sort of camaraderie and the whole Fettis brotherhood thing was really tangible. What work were you doing there? I have actually one book project that I I still haven't been able to finish but I'm going to start to work on it then again beginning from from next year so so I'm now working in Atmoseum so so I have I have done this in between and then I will continue the writing my first novel. What is the topic? It's about it's quite hardcore like I I had a boyfriend who who was beaten so that he lost his conscience and then he was dumped in the snow and he froze to death because he didn't come to his senses so that was quite a huge thing when I was 27 that happened to me oh no I was younger no but yeah 26-27 so so I've been thinking about that I should write about it like I'm really okay I I've really prosided and and it's just a huge part of my life but it's like I had really good long relationships after that so but yeah so I and now when this whole phenomena like it happened in in Russia and now as this whole phenomena of LGBT refugees in Russia is now happening so I have been doing quite a lot of LGBT work in with people from countries where being LGBT is illegal so I have been starting to collect those stories so it's a mixture of of like everything in the book is true but then the phrasing of the like the how things are connected it's not true because like obviously like I can tell my own story and that's the reason why I'm putting it to the book because I just don't want to be using other stories I also like want to open my own own story reason why I am interested in in this sort of like more hardcore stories of LGBT people but the main idea is to open the stories of people who are now having their refugee trip and and how they become who they who they have and because quite many obviously trans people as they do the refugee trip they are being raped and and misused in so many ways and and it's not like if you are like already being a refugee is a huge risk for your life but then if you belong to a minority it's even bigger risk but that's the reason why it has been taking so long to write the book because like I have to change them like I can't use the stories so that people will be recognized from them so I have been changing the stories and connecting them and recreating them so I have this sort of a fictional character doing her trip as to say my time as I'm recovering from my lost lost and and this whole parallel things like how anyhow coming from where I come from because I am white a privileged privileged cis men male I recover from huge traumas better than people who are in so many different ways like not as privileged because it's it's also it's not hardcore just hardcore it's also it's life of the people like there are so many people amongst us who are at this at this moment struggling with the horrors of trying to get a refugee place and and trying to survive at the same time because they are the trans or LGBT. Is Finland welcoming a lot of these refugees? Not enough I think and yeah and I think we should yeah yeah we should definitely take way more and and and yeah it's it is if the questions on that side if they are really problematic because at the same time you don't want to create gay ghettos where you force like people with with the same background but at the same time for the yeah it's yeah it's really problematic I don't know how to how to but yeah but I hope that western world would show that we believe in the in the morals that we believe and that's how we show it is that we open our borders to people who will not be safe in their own country. From what countries are you seeing many of these refugees? Russia is growing like and and Russia is very interesting it's a way to weird word for this but it's because people are quite educated over there and they they almost have the possibility to travel freely so so we easily don't realize that they are actually refugees and and there there can be situations when when being an LGBT parent for example is threat both to your children and to yourself and and so on so so we have to keep our eyes open and now there is obviously happening weird things in in in like also in in EU countries happening weird things and then there are parts in in in your country that have also quite alarming so yeah the Nazis are rising. What what weird things are you seeing from your point of view? Well for example in Poland in Poland they have there there are parts of the country that have said that we are LGBT free so this sort of thing there was also a small city or something just off Finnish border on the russia side that said that they are LGBT free and then on the other in the Finnish side of the border they had a huge bright march after that so so like this sort of we are having we are having both inside of the countries but also like in the nearby countries this sort of like quite hardcore backslashes it doesn't take away from everybody any anyone any anything if we give people rights to love who they love and and and so on but there is something weird going on with people. How do you see the situation here in the United States? People should talk more to each other it's not good that you are iso lazy like I was quite surprised when I talked to people and I couldn't find anyone who would even know a person that had voted for Trump so so like you should like there should be and you should recognize the family member and go and talk with them and talk endlessly until until they change their mind so like like you have to be in the dialogue although the dialogue would be super uncomfortable but it's the only way that we can win is that we just explain ourselves and reason and just like so if we isolate ourselves from from their media and from their platforms like I love going to different sort of Nazi chat pages with some sort of nickname gay 77 or something like that and then I'm just chatting with them about these subjects often I'm thrown away from the whole chat program but like then I can go back so that's how you should do you should like interact and and somehow try to reach do bridges even the place that you know that whatever you do you won't change anything but just that you are there you create something somebody reacts with you something stays so like I think that was something that I recognized three years ago when I was a couple of months there in Los Angeles I was quite surprised like how divided the country is and how little there is interaction and and like even the TV channels are different for for different people and like that's bad like if you have two completely separate narratives and no dialogue between them I'm a little surprised to hear that you would go on a Nazi chat page and engage aren't you afraid of that well it's just a chat I can then turn off my computer obviously I don't go with my own face or own name but I have had really like sort of my 77 and is quite normally what I use when I go so already from from my nickname you realize that ah okay this is what he's going to be ranting about I am not afraid of conflicts as long as it's not physical I'm not that afraid of physical conflict either I'm quite good with type boxing but like but it's not okay anyhow I don't like physical violence how is it eye-opening what should I even ask what you have yeah well it's it's yeah it's quite interesting when when they like how deranged people are but also like after like now and then you also get an interaction with people and you realize that it might be actually some sort of more mental issues and not just like not just being actually Nazi or or being like right wing that there might be actually some sort of other solution to the facts and maybe it's because of the society isn't able or isn't willing or isn't just don't want to put money into it don't want to help people so people turn to become something quite horrible I admire you for doing that I would never have the ability to do that multi mostly as a seat and what's golden girls but like a couple of times a year I do doubt right let's let's switch over a little bit to look at the ecmc for the benefit of the international audience would you please tell us what the ecmc is organization that is created by non-profits leather and fetish clubs of Europe try to create a platform and possibility to to interact and and and do more international work together so it's quite and the main idea that it's non-commercial so so all the associations are just the associations and there are no like like merchandising companies or anything like that involved so that's quite important it has been quite elemental in in creating and having this sort of continent wise nets of discussions what challenges does the ecmc face well there has been the discussion now to open the collapse to a more broad audience there was a huge discussion just like 30 years ago whether whether rubber was even a proper fetish or should it be only leather and so on so like like it's baby steps but but it's also when things are happening and now as as the concept of of gender and sexuality as the concept of gender changes obviously the sexuality will change so so it's good to have these discussions and have the and give the more traditional opinions the possibility to be spoken open and then to actually see like how and which angles and how how can we go further and and because like we sexuality can't be a tradition it can't be like no how do I say this can't be like museum like we can't have sexuality freeze like like well disney and then wake that wait a day that it will come back again so everything will change little by little and and we see changes in in young generations that are now mixing the fetishes and and the sport fetish with the leather harness and so on so everything goes and and obviously the I love how how trans men are now normal part of of our fetish existence so these sort of changes are coming but at the same time it's very important to to keep the discussion and to realize that uh that we have to respect the safe space for different sort of minorities and safe space uh isn't away from others so if we would open the safe space and everyone can come then it's not anymore safe for the people we wanted to create the safe space for you mentioned I'm going to take a step back you mentioned countries like Poland and other more restrictive countries are they also represented in the ECMC there was a club from Poland there is a club from from St. Petersburg and yeah yeah there are clubs and I think especially for those clubs it's very important to to have the camaraderie and and to have the possibility to meet others other other people and and yeah so I think it's very very important but at the same time it's so important that the collaboration goes on theorems so so that we don't from western countries go and say that okay this is how we're going to do it because they know their legislation and everything way better so we might fuck things up just by by for by forcing our ways of working things so they they know so it's it's very important for us to be not just humble but like just uh take them on the level and and listen how we can help and not go and give our help without asking like how they want to have it how many countries are represented oh my god I don't actually know we have like uh I don't know 15 something like that I don't actually know I should check that out I should know I don't know please tell us more about your specific position with ECMC it's quite a lot of diplomacy then just to find the find the right place to give somebody happy or everybody as evenly unhappy but what is the foundation motivation it's a platform for the clubs to meet and the clubs to create some sort of neutral territory where they can probably share ideas share their frustration share their possibilities that their dreams so so that's what it's all about so it's it's really for the for the clubs and that's the reason why it doesn't have president it has secretaries so the presidents are in the clubs and and then we just create them a place where they can they can meet it what are the plans post COVID I'm coordinating the media work so we have now created a new web page where the idea is that each club has two annual ECMC events so there is a pages where people can check those out and and then the clubs can go they have the right to go to the sections of the of the calendar or there and change the data and information and stuff so so it's more interactive and also the clubs can change the information and pictures of their own club in in the in the page so we are trying to make it more more so that it's just not so that secretariat does all the work but so that like all everybody is involved so that's the next page and then we are going to have a first like actual physical meeting where everybody is flying in we are going to have it in southern france in this in November so so and then then we see what happens there oh how interesting I wish I could attend what plans do you personally have for your future in the community I don't know a lot of sex what else I need to buy new boots I don't know like well yeah the new boots I need to buy like my expectations are quite low at the moment I just want to go to a party and meet friends and have a couple of beers like I will be really happy with that and now like we are actually in in two days we we end all the restrictions in Finland so so so yeah that's what I'm waiting for I'm quite easy as as long as the normality comes but then obviously I think probably in three months I'm already anticipating something more moon from the sky but now I'm just happy to have a couple of beers with my friends what do you still want to accomplish in the Leather King community interesting I think I'm like like obviously I have this book project and then I have another book project and then I would like to do my phd and then but then there is a book project I have I have some sort of like there should be something well written novel or something about about the chem sex scene or like something about like bringing this sort of like hardcore thing not as an obscurity but as a as a standard of of existence like I don't I don't know what I want to say with it yet but like it's it's a phenomenon that has been part of of a certain type of hardcore fetish community but at the same time it has quite been quite medicalized or or hushed up and there is quite a lot of almost xenophobic tendencies towards it so we hate people who do crystal meth or or we try to help them or like there is no normality and I don't know on which level can we have normality when there are so huge like problems and stuff going on on that scene but I think that's something I believe that in in 2030 40 years we will look back how we know how and which sort of legislations are do we have about chemical substances as we are now looking back the LGBT laws in 40 50 years ago so I think that's a change that is happening in the society and as a society or as a fetish community who have been always on the outskirt we might be able to open some eyes I don't know I might have to like Rosie ideas about this and it might be really horrible and and they're they're they're finding when you when you look closer to it but like this is something that I would want to see some sort of something more scientific and less moralistic being done with well I I can tell you that the chem sex scene is viewed very differently country to country how is the scene about it in Finland it's almost nonexistent and and also like yeah it doesn't there is no view on it's really in Finland so like I know that there was some sort of chem sex study done but there was probably like like 60 answers and you know it's not like like yeah it's yeah we drink alcohol and then we go hiking like we don't like we are disgustingly wholesome nation all right well that's very good to know I would like to thank you very much for a lovely interview today and for your contribution to inside another history a fireside chat