Hey everyone, it's Brian and welcome back. We're going to continue our conversation on threading. Now in the last video we talked about how you can connect signals and slots between threads. So the newbie is going to go out here and they're going to say, I got an app, I got a thread, but would my app be faster if I just made another thread and another and another and so on and so on. And what ends up happening is you end up making all these threads and it becomes this hobbled mess and it's very unstructured and you can see what I'm doing here. I'm just going to keep making threads, thread, thread, thread, thread everywhere. So this becomes a nightmare and on top of that, this is really not efficient at all because each thread has a cost associated with it in terms of CPU and RAM. So what you're really doing is you're not making your program much faster. You'll see some short-term gains, but as you keep creating threads, you'll exponentially see your computer slow down further and further and further until either your application crashes or the operating system just simply says, you know what, I'm done and you get like the dreaded blue screen of death. All right, so what is a better way? Let's get rid of all this stuff. This video we're going to talk about what's called a thread pool, which is exactly what it sounds like, but it takes a little bit of description here. So let's go ahead and move him off to the side. We've got our app and we've got this little guy and let's give him a different color and this is our pool. Now, what does that really mean? Think of the pool as a manager class of threads and I'm going to, I can figure out how to get him bring forward. There we go.  Now you notice a pattern. I'm starting to create threads another and another and another, but it's going to stop at a certain limit. And usually this limit is tied to the number of cores in your machine. But you notice what I'm not doing. I'm not making tons of these. I have a pool, which is a manager, and it's going to manage these threads. And as I send work from the app to the pool, let's actually do that. And let's just put it right here. As I send work to the pool, the thread pool is going to determine what thread it goes on, not us. So bear in mind, these threads may not all be used or they may be all flooded with work at which point your little workload that you're sending to the pool is going to go in a queue and just sit there and wait until a thread becomes available. This may sound like a bad idea, but it's actually highly efficient and highly structured. It's also extremely easy to implement. So we're going to dive in and take a look. But before we do, real quick, I wanted to shout out to Qt Company. They have released the long term support version of Qt 6, and they also published the new Qt 6 QML book. This thing's awesome. Here's the link right here, Qt.io slash product slash Qt 6 slash QML dash book. I'll try to remember to put a link down below. If I forget, somebody please in the comments, just drop it down there. And if you're looking for more structured kind of learning, I do have courses out on Udemy. Just search for Qt 6, or you can search for my name, Brian Carons. And you'll see all my Qt 6 courses out there. And I have all my Qt 5 courses along with a migrating from 5 to 6 course out there. But enough of that, let's dive in and take a look at Thread Pools. First off, Thread Pools are fast, easy, efficient, and well, they are already baked right into your Qt application. So you don't have to add any external library or anything. They're already there. You're already using them. You just don't realize it yet. So let's make a few classes and let's tap into that power. So we're going to right click, add new. And first class I'm gonna make, let's go ahead and call this manager. I help if I spelled manager correctly. There we go, manager, there we go. Make sure this is a Q object because we want signals and slots. Next, finish. I'm gonna hit no on that, it'll still pop up. And then add new. We're going to make another class we're gonna call this worker. Make sure this is a Q object as well, because again, we wanna be able to use signals and slots. That's what makes Qt so powerful. Now because we're using CMake, we have to add these and at the time of this recording, you have to manually do it. Maybe someday that'll change, I don't know. All right, once we're there in there, make sure they are loaded into the IDE properly. So what are we gonna do here? We've got our main file, which is going to take a manager and that manager is going to run some workers and those workers are going to run on what's called the thread pool. The workers, however, really don't even know the thread pool exists. They just know that they're on a thread somewhere. So let's start with the simplest one. We're gonna do the manager and we're gonna flip over here and what the manager's going to do is, well, manage things. I'm gonna do a little bit of copy and paste because this code's pretty rudimentary and I think you got it by now. So we're gonna add in a Q thread pool and a Q runnable. A Q thread, a Q debug and our worker class. This takes a little bit of explaining though. You need a Q runnable to run inside of a Q thread pool. So highlight Q runnable, hit F1 and you'll see the Q runnable class is the base class for all runnable objects. When you see the word runnable, it means it's going to run inside the thread pool. Now, you should also note that this is not a Q object. That's right, I wanna just say that one more time. When you look at this, notice what it is not. It is not a Q object, meaning runnable itself does not have signals and slots. This often confuses people because they will create an object using Q runnable, throw it in a thread pool and then they can't talk to it. So to get around that, we have our worker which is a Q object and we're going to turn this into a runnable. Doing that is extremely simple and let me bring up the header file here. In my notes, we're going to plop that in, we're gonna do Q debug, Q runnable, Q thread. So we're gonna say public, Q runnable. Now, simply right click on Q runnable and refractor, insert virtual function of base class. And we wanna go ahead and make sure that the Q runnable run is selected. Notice this is a virtual void. So this is just simply an interface. If you don't want an interface is, it's a contract between objects. Or I should say a contract between classes that says they will have certain properties, methods available. So the Q runnable is an interface to the thread pool saying it will have a run function in there. And because it's virtual, we have to implement that. Now we got this. We can go to refractor, it might already be in there. Let's find out. It's already in there for us. So what does this really do? Well, two things. First run is what's going to be called by the thread pool. Remember, the manager is what we're going to do to work with that. So let's focus on the manager real quick. And I realize I'm flipping back and forth and that might get a little bit annoying, but trust me, this is ridiculously simple. So we're going to just do the magic copy and paste, boom. We're going to have a signal from the manager called work, which is going to tell the worker to do something. This is really not the correct way of doing it. So I'm just going to put a note in there. Not the best way. We're going to cover other ways in other videos, but I'm going to explain why later. Just usually put faith on that. But then we have some public slots. Start, started and finished. Start is going to start the workers. Started is when the worker tells us it started. Finished is when the worker tells us it's finished. That's right. We have some communication back from that worker now. We have that via signals and slots because we are implementing both Q object and Q runnable. I should say we're inheriting Q object and implementing Q runnable. It's super confusing, I know. That's one of the caveats of C++ is that you can have multiple inheritance. All right, so we're just going to add the definitions here. And I've been asked by a lot of people to try to slow down. I have a tendency to make these videos slightly slower than I actually work in real life, which is usually Mach 5, so I go pretty quick. But I'm going to try and slow it down. Again, use the buffer bar below for anything that you want to just skip through. So recap, we have a signal, work. We're going to tell workers to do things. It's not the best way to do that. And then we have slots, start, meaning we're going to start some workers, started. The workers started and finished, meaning the workers are finished. All right, that's a mouthful. All right, let's flip in here and let's take a look at our code. We just want to be able to say, you know what? We created something. We created our manager. Now, start, this is where things get a little bit interesting here. I'm going to say four, and we're just going to make one worker for now, just one.  So let's just focus on one for the moment here. Now, because we're doing a cross-thread operation, we should not have a parent. So we're going to say worker, and a pointer to, this is a queue object. So instinctively you're going to go, ah, I should put a parent in here for memory management. Don't do that. And here's why. The worker is a queue runnable and it has a special getter and setter in there called auto-delete. So we're going to say set auto-delete and we're going to set this to true. What this is going to do is tell the thread pool that executes this to delete it when it's done, because guess what? We don't want to worry about memory management. We just don't want to have to deal with that. Now, because I absolutely hate writing this code, I'm just going to copy and paste it. But feel free to pause the video if needed. We are going to connect the worker started signal, which doesn't exist yet, and the finish signal to the manager started and finished. And then the manager's work is going to go to the worker work, which doesn't exist yet. We're going to get to that. But notice we have queued connections. I'm going to explain this a little later on in the video. Super important you understand right off the bat, this will use what's called an auto-connection, which under the hood will attempt to flip this into a queued connection. But I'm just going to put that back for now. And then we're going to go ahead and say queue thread pool global instance. And when we do this, this is the instance or the thread pool that is created automatically when your queued application starts. You don't have to do anything, it's just there. And we're going to go ahead and say start. And we're going to go ahead and start that worker. Now, this does a few things, but really what it's doing is it's taking that worker, putting it over to the thread pool and when a thread is available, it moves it to that thread and then it goes into the worker and calls run. Lots of words, all the words. And I absolutely deleted that, there we go. So your main takeaway here is your manager is going to create a worker without a parent. We're going to set auto-delete to true because we want the thread pool to manage the memory. Then we're going to say thread pool, current instance, whatever it is, just go ahead and start this specific object. We're just doing one for now. Now we're going to go down to started and finished. This is where the worker is going to talk back to us.  So I'm going to say worker. And we're going to do a queue object cast. A lot of people out there are going to get very, very confused if you don't know what this is and go, why aren't you using a static cast or some sort of C++ thing? Queue object cast is built right into queue and it's specifically designed for casting queue object and it takes a lot of the complexity out of it. So while I'm not going to dive into it in this video, we are going to probably cover it a little more in depth later on. So what we're doing here in this slot, something called this and that something is a queue object we can access from the sender function. It is going to return a pointer, the queue object and we're going to cast that pointer using queue object cast into our worker class. If this line completely mystified you, please go back to C++ 101. But basically we're getting a pointer, we're casting that pointer into something we can work with. Now, because we do not trust pointers, we need to test it. So I'm going to say, if not worker again, there are a billion different ways you could do that but if we don't have a pointer, we're just going to jump right out of there. We're going to pull the ripcord and just eject right out. So what we're going to do next is we're just going to say queue info started our worker object on whatever our current thread is, special note on current thread. This is going to be running on what's called the main thread, our manager. But our workers when they start will be on a pool thread and you'll see that later on. And we can grab this and just do the old copy and paste right here. We're going to say finished and put that right there. So very, very simple code. There's really not a lot of complexity to this. There are a few caveats. So for example, when we start, we're going to tell the worker to work. We're going to have that special function in here that we have not put in yet. So that's the highlight of the manager. Now we're on the worker and this is the little buddy here who's going to do the actual work. So what I'm going to do here is I'm going to just copy out of my notes just to save a smidge of time. So we've got a constructor, a deconstructor, two signals, our public slot, work. And then we have our runnable interface. So let's go ahead and flesh these out. Nope, those are signals. See, I get tripped up even sometimes too. I just get so focused on what I'm doing here. In case you're wondering, no, you can't implement a signal. That's what Qt does under the hood with Mach. So anyways, we've got a few things going on here. Very, very simple class. We have our constructor. So I'm just going to say this was created. And then we're going to say this was destroyed. In case you're wondering how I can just magically do that, I'm copying and pasting for my notes off the screen here. And we're going to say work. Special note to this line right here. We're going to play around with this later on, but just remember this work function or this work slot. Now run, this is where we actually start in the thread pool. So I'm going to say starting and then finishing. And I'm going to pull them out here. Starting in the thread. Finishing in the thread. And what I mean by this is when this is done right here, this little line, that thread is going to check our worker because it's a Q runnable. And it's going to see if that auto delete flag is set to true like we did in our manager, set auto delete true. And if it's true, it's going to wipe out this object and then free that thread up for the next worker or the next Q runnable that gets pushed onto it. So while we're in here, we can do some actual work. So I'm going to say emit started. And right here, we're going to emit finished. Wow, I cannot type today. What is going on here with my keyboard? How embarrassing. Okay, there we go. So we're emitting started, we're emitting finished. Sometimes when I slow down, it just does not help my horrible typing. So what we're doing here is we're telling any object that's connected to us, in this case, the manager, that we are starting and then finished and then we're going to do some work in between. And this is where you can just do anything. I'm just going to simulate, we're doing some sort of computation or work or something. I'm going to say, I is lesson five. I'm going to go ahead and increment I. And now let's go ahead and say, this is what I mean by this program is going to be really chatty. Queue thread and we want the current thread MS sleep. And what this is going to do is put the thread to sleep for a number of milliseconds. Now, in the background, we won't see that because this will be running on another thread, but this thread literally goes to sleep and does nothing.  So for one second, which is an eternity in computer time, this is going to do absolutely nothing but sit there. Just simulating some sort of work. If you look at the structure of this program, it's actually barely simple. We're just printing a bunch of garbage out on the screen, but we're going to show it's created when it's destroyed. We're going to be able to call this slot from another class. Remember, special attention to this, it's going to cause issues. And run is when this is started on the thread pool. And all of this and anything you call in here runs on that thread, which is what we're going to demonstrate really quickly. All right, let's jump back into our manager. Suddenly all these connections really start working because we've got everything in there. But I want to highlight, the worker is connected to the manager and we're connecting started to started. So when the worker starts, it's going to tell the manager it started. When the worker is finished, it's going to tell the manager it's finished. And we're doing something backwards here. We're saying the manager work is going to connect to the worker work. So what does that really mean here? Manager has a signal called work. And I said this is not the best way. You're going to see why in just a second. And the worker has that slot work, which really does nothing but prints work out on the screen. See, right here.  Because this seems like it's overly cumbersome. We're going to wrap this up really quickly and we're going to go down to our main and let's start filling this out here. So what do we need to do first off? Well, we need two things. We need Qthread and our manager. We need Qthread because I want to rename that main thread so we can see the difference on the screen. And we're going to say set object name because yes, this is a Q object. We're going to go ahead and set that name, main thread. So we can see what's going on. Then we're going to say manager. I feel like I should have named the class Karen instead of worker. So the manager is telling Karen what to do. You know that internet meme joke that Karen's. Whoa, I got thinking about memes and I couldn't concentrate there. Sorry about that. And we're going to go ahead and start. Now somebody out there is going to say, now wait a minute, I see that little icon right there which means this is a slot. Why are you calling this as a function? Well, that's the beauty of Qt. You can call it both ways. You can call it as a normal function or you can call it via signals and slots. It simply doesn't matter. All right, let's give this a good build. Make sure we don't have any little gremlins laying around in our code. All right, we've got a successful build. Let's go ahead and give this a test. Let's go ahead and test this. Go ahead and say run. And let's see what we got here. I'm just going to expand that out. All right, we've got our full life cycle of a single worker right now. We have created the manager on our main thread. We've created the worker on the main thread. Then we're starting the worker and notice suddenly it is on a thread on a thread pool. So we got our Q thread pool thread, say that five times real fast. There's the memory address and it's just simply named thread pooled. You notice that little pooled right there tells you that it is in the thread pool. So this is a thread that Qt made for us. We don't have to worry about it. Now we've started the worker on the main thread, meaning what we're doing is we're starting it and now it's coming back and telling us, hey, we have started. And let's go ahead and show what I mean by that. So we're in the manager. We're gonna say thread pool global instance, start worker. And in the worker, it's gonna go ahead and when we're ready, run. And it's going to say starting. And let's flip back here, starting. And this is on the pooled thread. Then we're going to emit started. And remember in the manager, we have our signal slots. This can get really confusing for newbies. But when the worker is emitting started, the manager started slot will get called. And that's exactly what's going on here. Started is being called back in the manager on our main thread. Yes, that's right. So now we can have communication between that object, even though it lives on a thread pool in another thread. This is extremely cool stuff. So we can see it started and we can see when it was finished. We also see it was destroyed and finished-ing. Finished-ing. I don't even think that is a word. I'm going to have to fix that, it's going to bother me. Let's go in here and fix that really quick. Finished, where is that worker? Sometimes we just like creating words, finished-ing. Man, I hope somebody caught that, finished-ing. There we go, finished-ing. And just making a whole new language. Anyways, back to this. Really what we have here is we have a manager. It's creating a worker. It's starting the worker. The worker is letting us know it started and then it's running on the pool thread doing its thing. And then we've got this annoying finished-ing. I can't believe I typed that. And it is running on the thread pool and it's destroying it because that auto-deletes there and then we get that signal at the very end saying, hey, it was destroyed. This is actually really cool stuff. And when you think about it, you don't need to do a whole lot. At a high level, really, you just need a queue object that implements the queue-runnable interface, which is as simple as just including it. Adding it, right-clicking and then going to Refractor and then Insert Virtual Functions of Base Class and adding in the run. It's really ridiculously simple. As long as you have that everything inside of run is going to be run on that thread pool. Now, I did say pay special attention to work. We're gonna mess around with this. This is what I've seen newbies do all the time. We're in the manager on started. This is where the worker has emitted a signal, started, and the manager is being called via cute through the signal and slot right up in here. So we're gonna tell that worker to do something. And what I'll see a lot of newbies do is they'll do something like this. Worker dot, and let's go ahead and say we want to call a function directly. Yeah, don't do that, bad, bad, bad. Don't do that, but let's see what it does. All right, right away, I can see the problem I hope you do as well. Our work is running on the worker, which is living on the thread pool, but it's being called on the main thread, not on the pooled thread. Oh, no. So if you were doing any sort of heavy number crunching and you try calling that on the work function, on the worker, you just defeated the whole point of even using a thread pool because you're right back on the main thread. Yeah, so that's super frustrating. So what a lot of people do is they go, hmm, how do I solve this problem? Well, there's two ways. And I'm gonna tell you one way which I do not believe is correct, although I've seen it work and honestly I've used it myself and that's signals and slots. So instead we're going to emit work. And this is our signal on the manager that is connected via signals and slots to the worker. And we're saying, hey, it's time to work. And the manager work will emit and call the work slot on the worker. Notice I have this cute connection here. There's a reason for that. But let's go back to the normal auto connection. Let's run this and see what happens. All right, you notice how it's still running on the main thread. That's not good. So totally defeats the purpose of doing that. This is where you start diving into Google and you go, hmm, all right, well, I think I'm gonna read about this and we're gonna go here. We're gonna add in a cute connection. And let's just highlight this and F1 on the screen to bring up the help system. So auto connection, this is where cute tries to figure out if it's on the same thread or not. And if it's on the same thread, it does a direct connection. If it's not, if it's on a different thread, which clearly this is on a different thread, it does a cute connection. So what's the difference here? A direct connection or same thread, the slot is executed in the signaling thread, meaning the main thread. Cute connection, the slot is executed in the receiver's thread. I want you to highlight that, the receiver's thread, meaning this would be the thread that the object was initially created on. And let's go ahead and demonstrate that. A lot of people think it's the thread the object's on and it couldn't be anything further from the truth. So I've got this manager work will emit, the worker will call the work slot and this is cute. So this should be the receiver thread. And let's run this, see what happens. Oh, you can already see the issue right there on the screen here, main thread. Even though we're using the cute connection, it's still being called on the main thread and that is simply because we created the worker on the main thread, so that's where it's gonna call it at. Is this a bug in cute or is this a design flaw with my application? Well, you could argue that it's both, to be brutally honest with you. I don't like doing either of those cause I don't like trying to figure out what's gonna change in cute's code base from one version of the next, even though it's been amazing and very stable, it doesn't really work the way you think it would. So what I do typically is I don't do this at all. What I will do is I will close that and I will not do either of those. I will simply run my application, but when I do, I give this worker everything that it needs for its entire existence when I start it and anything that it needs should not get outside stimuli unless it's getting that stimuli from something that was created in this run function on the actual thread that it's living on. So I hate to give you that bad news, but that's one of the little caveats of using a thread pull is you will get into some weird cross thread operations where you're scratching your head trying to figure this out. Now I know you're gonna ask, yes there are ways of calling it directly on the other thread, but it gets a little bit more involved than where we are now. I just wanted to throw that out there in case you're working with this and you get stuck. So quick review. This is a thread pull and how to work with it and how to communicate across thread to that object running on the thread pull. The biggest thing you need to do is create a queue object, implement, queue runnable and then start that out on the queue thread pull. Happy coding and I hope to see you later. I hope you enjoyed this video. You can find the source code out on github.com. If you need additional help, myself and thousands of other developers are hanging out in the Voidrealms Facebook group. This is a large group with lots of developers and we talk about everything technology related, not just the technology that you just watched. And if you want official training, I do develop courses out on udemy.com. This is official classroom style training. If you go out there and the course you're looking for is just simply not there, drop me a note, I'm either working on it or I will actually develop it. I will put a link down below for all three of those. And as always, help me help you. Smash that like and subscribe button. The more popular these videos become, the more I'll create and publish out on YouTube. Thank you for watching.


I've been writing for so many years, I started out primarily as a fiction writer, wrote a lot of short stories, wrote a few novels that didn't get published, the stories did, and then I discovered creative non-fiction sometime in the 1990s and it was still a sort of developing form at the time, at least the naming of it is creative non-fiction and figuring out all the different parts of the non-fiction world that were part of non-creative non-fiction, and I immediately jumped ship and said, this is where I belong. 20 years ago I started an online magazine, I never imagined it would last that long. It's non-fiction, essays and memoirs, 750 words or fewer, but it's a it's a challenge writers have taken up and that's why we're still here. We publish writers from Scotland, Ireland, a number of writers from India, the East. It's all English speaking writers or Americans living abroad, some of them very well known, some of them emerging in their career, some of them publishing for the first time, but it's grown from sort of a small little project I did at home to a magazine that gets 10,000 readers a year. Fairfield MFA is a strong program, it's a program that's very diverse in many different ways, including the life experience and age of the participants, but it's a program that represents America very well and likewise the issues in America very well. So the students here are writing about all these very pressing issues in our culture. Andrews Island is beautiful, it's a lovely space on the water, it's stunning the buildings that we're teaching in and staying in and eating in beautiful stone buildings. The residency itself is just so full of energy and vibrancy, the students clearly are happy to be here, excited to be here and I feel the momentum growing as the week goes on. Students in the creative writing program obviously are hoping to become better writers and the goal of writers everywhere is readers, eyeballs. I have something to say, I want people to hear it. There's strategies that work better, there's strategies that we know and strategies we're learning that every story's a little different. So to read the incoming submissions for a magazine like Brevity, you learn a lot about what works and what doesn't. You also learn about the world of editing and publishing. Students might want to go on to work in editing and publishing, but even if they don't, if they spend their life as a writer, sending their work out to magazines to book presses. It's useful to understand how that world works and what the editors are thinking when they open the envelope, although nowadays they're opening an email about an envelope.


starting the sixth mass extinction. That's a question that we really have to discuss. And for that discussion, we here at Zanktec, I'm Jay Fiedel, and our discussion today is on community matters. We're going to discuss that with Dr. Robert Cowey of the Pacific Biosciences Research Center at UH Manoa. Welcome to the show, Robert. Nice to be here. So you were in the paper not too long ago about the sixth mass extinction.  But it's not happening right now. I guess the issue is, is it happening soon? Can you give us a, a pre-see on what it is this mass extinction we should expect? So there have been five mass extinctions prior to what this one might become. And the rule of thumb is that that means that 75% of all species on Earth vanish. That's the sort of rule of thumb definition of a mass extinction. This one is different from the previous ones, because this one is entirely caused by humans, human activities. And at this point, we can't say that the sixth mass extinction has happened, or even perhaps that it is happening, because you can't say that it's, that we've reached 75% of species going extinct until it's actually happened, right? And so what we said in the, in the paper that was recently published that attracted a lot of media attention was that, well, at the rate we're going right now, and we estimated that rate of extinction, at the rate we're going right now, then at some point in the perhaps not too distant future, particularly as the rate increases, we will probably come to a mass extinction. At this point, we would say that we're probably at the start of it. So what, so if 75% is sort of a benchmark, where are we now? Are we at 1%, 2%, 5%, where are we? We're at maybe 10%. Yes. And the numbers that we extrapolated based on some research of our own that we did a few years ago, suggested that between 150,000 and 260,000, so give or take 200,000 species with a bit of sloppy the way, have gone extinct already since the year 1500. And I can explain why the year 1500, if you're interested in it at the moment. Yes, please. All right, well, let me come back to that because the point of that roughly 200,000 species going extinct since 1500, is that that has a proportion of the known species that exist on earth, those that we found and described and given scientific names to, there are about 200,000, there are about 2 million of those out of maybe 10 million total species, the rest that we don't exist yet, we're just estimating that. But of those 2 million species, we estimate that around 200,000 have already gone extinct. So that's around 10%. That's a striking number. And a lot of those species are not the elephants and the tigers and so on that everyone hears about being really critically endangered. But it's all the things that we don't know so much about, the little creepy crawlies and so on, but there are myriads of them in the Amazon jungle that's not being explored and is being destroyed as we speak. So it's a number. So I'm thinking of a British scientist who was in the media a lot. He's made some movies, David, I want to say David Attenborough's. Yeah, I met him at the Bisham Museum 20 odd years ago when he was filming the land snails, the Hawaiian land snails, free snails that he was making a little tiny section of one of his life on a movie tour, not one of that. Well, one thing that he always says and repeats and repeats is that it's all interdependent. And if you lose a species or a group of species, that's going to have an effect on other species. And it's not in a silo. It's all connected in many, many ways. I guess that's the general knowledge, that's the general point. And so if we have lost 200,000 species in the world today, how would you say, looking back, looking back to 1500, how has that affected us? Well, that's a really difficult question because no one's really, I think, tried to answer that. We can speculate, you know, a lot of those 200,000 species are going to be, like I mentioned, the little creepy crawlies in the jungle somewhere. And the issue there is you've undoubtedly heard the analogy of a plane losing a rivet here and there, still carrying on flying. So it still functions as a flying plane, even though it's lost a couple of rivets here and there. Now it will lose a couple more, now it will lose a couple more, but eventually it'll come to a point where it falls out of the sky, right? And so I think that there's probably a lot of redundancy among species out there in terms of what their functions are, but their functions ultimately are including the functions of these little creepy crawly slugs and snails, which is what I work on, and insects, myriads of insects and spiders and beetles and etc., etc. So as swaths of them disappear, then ecosystem function is ultimately damaged. And I had a graduate student some years ago, Marty Meyer, and he published a couple of papers in which he described some experiments that he'd done in what we called mesocosms. They're like cages that he set out in the rainforest on the Big Island. And what he showed was that the snails, in particular, the snails were responsible for, I think it was something like 30% of the turnover of nutrients in the system. And I mean, he was, unfortunately, having to work with non-native snails because those were what were abundant in the rainforest and the native ones disappeared. Perhaps those non-native ones were fulfilling the roles that some of the native ones previously did, but since we don't know what the roles of the previous ones were, we now know what the roles of the invasive ones that he worked on are. We can't really say whether they have fulfilled those roles or not. And so it's very, that comes back to what I started off by saying, it's very, very difficult to say what's changed. Since we don't really know in sufficient detail, yeah, we know that there were snails there, but we don't know what they did exactly. Because snails don't all do the same eight different things. Same with insects and so on. And so, yeah, you can probably say that if some top predator goes extinct, then some of the big ecosystem impacts. So, for instance, when wolves are extirpated, okay, gray wolves are not extinct yet, but they're considered endangered, even though the fish and wildlife service doesn't acknowledge that anymore. When wolves are extirpated from a particular area, then the deer increase in numbers and they eat more of the vegetation that believes on the trees and the flora, the tree flora changes dramatically. And that's because the wolves have disappeared. So if wolves go extinct across the whole swath of Northern North America, then maybe there's going to be some regional change in flora. So things like that can occur, I think. But like I say, it's very, very difficult to say how things have changed since 1500. We can look at how environments have changed, how humans have impacted environments, but is the change specifically related to the loss of particular species or group of species? That's very, very difficult to say. Well, that's so interesting. And it begs to say this is very, very complex. And the more you find, the more you need to find, the more you know, the more you need to know. It's our whole world. It is our whole world. But you know, it reminds me when you talk about snails on the big island, I think of rat lungworm. And I know you were on our shows a few years ago to discuss that. So I say to myself, well, rat lungworm could be eradicated if you just eradicated the snails. Maybe I'm wrong, but that's part of the life cycle of the worm. On the other hand, if you eradicated the snails, you'd have other implications. You'd have other subtle effects, maybe not so subtle effects on the flora and the flora. The same thing with other organisms that carry pathogens or that are pathogenic. I mean, we are always tempted to eradicate them to avoid the pathogen, like mosquitoes carrying any number of mosquito diseases. But if we do that, if we knock out a particular species or group of species of mosquitoes, we'll pay a price in some other way. And that all begs for further research, doesn't it? Well, that's absolutely right. I think specifically with the mosquito issue, there's actually a group of people heavily engaged right now here at UH in developing potential control measures or very sophisticated genetic approaches for the control of mosquitoes here in Hawaii. Because for the exact reasons that you mentioned, the difference here is that those mosquitoes were not native. And they come here, they're a menace to us. We don't like getting bitten by mosquitoes when they carry disease. But they also have caused the extinction of a number of native Hawaiian bird species, of course. And so there are multiple ramifications of having mosquitoes here in Hawaii. But you could argue that getting rid of them is reverting the environment back to where it should be, perhaps, or where it was at some point in history, prior to the introduction of Los Pitos, which are not native here. So, you know, it's complex. It's complex socially as well. Yeah, and that's sure. And I want to hear about the social part, but it just strikes me that biology, which is your field of study, is not static. That you have to, it's beyond looking at the ecosystem now, today, and all those millions of connections and effects of, you know, those domino effects of, you know, acting on one thing in the environment, having all this secondary effect. It's more than that. It's you got to look back historically by taking a slice off a tree to see what it was like in 1500 and 1600 and so forth. And then also you have to look forward. You have to look forward to that 75% of the mass extinction, which I want to ask you about. But you said social implications. Tell us about the social implications. It's kind of related to the social implications, but there are people here and we discussed this in the paper, who not just here in Hawaii in the world, who think that, well, let me back up. I think that this crisis is horrendous. And I think that we should be doing something dramatic to try to stave it off. I mean, I'm very pessimistic about that. I don't think there's social aspects of it. I don't think there's the political, economic, societal will to actually do that. They would require huge changes. I don't even know if I'm prepared to suffer the hardships, if you will, to exaggerate perhaps, but it would be required to reduce my carbon footprint, for instance. There are people better than me who are able to do that. But anyway, that's one thing. There are people who, unlike me, don't actually care.  We evolved from some other humanoid animal, ultimately. And of course, some people don't believe that, but that's a whole other story. So we did evolve, and they say, well, we're continuing to evolve. We're just another animal doing its thing in the great sort of evolutionary maelstrom. Evolving into extinction. But quite possibly. But the thing is, they think it's okay because they think that they don't think that humans are going to go extinct. They think that we're just doing our own thing, and that's evolution. And if human evolution means that 75% of biodiversity on Earth disappears, then so be it. That's just the way nature works in the greatest scheme of things. There are other people who go so far as to not only say, that's a sort of laissez-faire attitude. There are other people who take an active attitude in which they think that, sure, there's a biodiversity crisis. Great, let's manipulate it for our own benefit. And who's going to define that benefit? That's a big question for me. And actually, the answer is probably fairly straightforward. It's going to be politicians and economists, business people, not people like me who don't have any kind of or very little influence over those aspects. Well, that sounds like exploitation, isn't it? Yeah, sure. But they're fine with that, because their focus is the benefit of humanity, whatever that means. And there are some benefits that I talked about, like developing countries, increasing their GDP or whatever the economic things are that allow those people to have the kind of lives that we have. And maybe that's a good thing. But isn't this run a parallel to the dichotomy of social thought over climate change in general? There's a lot of people that either deny it or say, well, that's the way it goes. Maybe it'll return in another million years to the way it was. We can't do anything about it, so we won't worry about it. Or if it gets worse, it won't affect us. It'll affect our children. Same thing with mass extension. If it gets worse, it won't affect us. It'll affect our children. And they will have better science then to deal with it, which it may or may not be true. But can you talk about that, the comparison of the social response to this notion of extinction and the social response to the notion of climate change? Like you've implied, it's very similar. It's all ultimately about this whole science denial thing. They're denying that there's climate change.  It's just the natural cycle of the climate, the climate. Just like I just described about, well, it's just humans evolving. And this is what humans do when they evolve. I think that the whole science denial thing is very scary. And it's not just climate change and biodiversity extinction. It's COVID, vaccination. That's everything that we talk about in the news right now. I'll tell you a funny story. When this paper first came out and we released the new age release press release, one of the first people to tweet was, and this was in response to a tweet actually about our paper, was Elon Musk. And he tweeted basically, and I'm paraphrasing here, he tweeted saying, yeah, everything is going to go extinct. You've actually, when the sun expands and eats up the earth, including humans. So we need to become interplanetary. This is just piggybacking on our paper to self-serve and get people to support his space exploration. Because you know when the sun is going to engulf the earth, five billion years from now. Yeah, well, it's all out of science fiction, but it may or may not be true. Science fiction changes. So a couple of things that you mentioned I'd like to inquire about. Number one is, this may be a hard question, I'm not sure. But we have a continuum here at say 10% extinction now, and say 75% where it really is destructive. What is it like if I wake up one morning at 75% extinction? What kind of a world do we have with 75% extinction? What we'll have and sure it's speculation, but we're on the road to this already. We know that. And Hawaii is a microcosm of this. If you think about it, before any people arrived here in Hawaii, there were all those birds that have now gone extinct. There were all those plants that have now gone extinct. There were all the snails that have gone extinct.  But it ramped up once Europeans, wetlands, Europeans, Americans, what have you got here? And it continued to ramp up. And we published a paper back in 2015 about the group of snails, a family of snails, native Hawaiian snails that are only found here in Hawaii. In this group, which is called a family, there were 325 species. And we now think that of those 325, only maybe about 20 are left alive. So there you've got more than 75%. But that's just within that one group. And it's not to talk clear what that group did or didn't do that is different now because the habitats all changed anyway. So what's happened here is first of all we've got all that extinction. But then we've got a lot of invasive species here. You've heard the expression, endangered species, capital of the world. Also the invasive species, capital of the world. And so everything's changed here. The fauna, the flora of the islands, what's left of the original ecosystems and plants and animals are mostly confined to the high, not entirely, but mostly confined to higher elevation, mountain tops and so on. What's down below, I mean, we never see a native bird in our yard. We never see a native snail in our yard. We've just got bull bulls and miners and slugs. And so we're already seeing what it's like to have some loss of native biodiversity and its replacement by other plants and animals. Most of those animals, which is what I know more about, but plants too, are species that are not, obviously they're not just nature to Hawaii and nowhere else because they come from somewhere else. But these are species like the giant African snail, which everybody knows, that are now pretty much all over the tropics. And so what you're having is a homogenization of faunas and florets. So replacements of the Pacific Island is a classic, the classic example of this, not just Hawaii, but all the islands of the Pacific, where you had the snails, for instance, you had maybe 5,000 different species of snails, each living on a single island or a small archipelago. Those are disappearing and those are being replaced by half a dozen or 10 or 15 non-native snails introduced by people that have now spread all over the Pacific. So the fauna has become significantly homogenous across the islands of the Pacific, whereas before it was very diverse with local endemic so-called species. What's wrong with homogeneity? I mean, certainly people are, I don't know if nostalgic is the right word, but they harken back to a day when Hawaii was more isolated and had its own ecology and it was different than anywhere in the world. And now we're becoming homogenous. And so what's bad about that? What have we lost and what has replaced it in terms of the benefit to humanity? Okay, I think that an issue that we haven't touched on is benefit to humanity simply in terms of the joy and the pleasure we get from not just seeing nature, but knowing that diverse nature exists out there. I mean, to exaggerate a bit, how would you like your grandchildren not to be able to see a live tiger, even a tiger in a zoo, because tigers have disappeared.  The snails that we work on, this group that I call the paper work, these snails are going extinct at a rate of knots, and particularly across the islands of the Pacific. And so what we at the end of the paper exhorted scientists like me, I'm too old, I can't hike anymore, but other younger people who can do heavy duty field work could get out there and collect representative examples of every single species that they can find, particularly the ones that have never been described before. And there's a truckload of those out there that are already going extinct, we're finding them already extinct, we're finding the shells. And so collect them, put them in museum collections. It may take 300 years to actually describe and name them all, but at least they'll be there so that ultimately 200 years, 300 years, 500 years from now, those, our descendants would be able to see all those snails, and it could be, it could be lions, it could be elephants, it could be rhinoceros, it could be birds or crocodiles, whatever. And know that once upon a time, there was this spectacular diversity living on earth that we've unfortunately lost. And I think that maybe that's an emotional response, but I don't think there's anything wrong with that. There's a tropical garden, tropical preserve in Manoa, up the back of the valley there, I forget the exact scientific term of it. And they save things, they save plants that no longer have an environment in which they can survive with the notion that one day- Part of New Lakes, Delay and Alboree from Hawaii. That's it. We had a show there once a few years ago. And what I remember was a very interesting notion that one day we would take all these plants that we were saving, carefully, carefully saving in the arboretum, and return them to the environment that would be nutritious for them if it ever came back. But it wasn't clear that that environment would ever be available again. What are your thoughts about that? Is that a worthy effort? I think I do think it's a worthy effort. And we're doing the same with the snails. The DLNR and the Bishop Museum both have big captive rearing, captive breeding populations of native Hawaiian snails. And the goal is to get them back out in the field eventually. And the DLNR, along with the arming people who own a lot of the land in Oahu, are actually doing that in a limited way by putting them out in predator-free eggs closures. So these are fences around an area of habitat that's suitable for the snails. And it keeps out the various predators that are one of the major causes of the extinction of these things. So it seems like pie in the sky to hope that things will go back to normal. Not normal, but what's normal. But back to sort of more native habitats. But it's not inconceivable, if there were a will, at least in small areas to do that. I mean, I think that New Zealand does a great job in some of these regards. I went to the Nature Reserve Bay, right in the centre of Wellington almost. But it's been completely fenced off. You have to go through double doors to get to it, like a fair thing. You know, like a tropical disease laboratory. Yeah. And, you know, they had all these native plants and native animals, things that had been excavated from everywhere else in that area. And so I think it's not entirely pie in the sky, but there has to be a will. And that's what is the problem. That takes us to the study of biology in general. I mean, we talk about this very complex global ecosystem, which is being homogenised as we speak. And we're losing, you know, various elements of it. We don't know what the cost is to lose those elements.   The man on the street doesn't know about this. And then ultimately, maybe biology will get to be a science that will be able to preserve these species, be able to understand more completely how each one affects the other, and thus to save the planet, save the biodiversity from extinction. I mean, do you see biology and what you do in biosciences as a science that can actually affect scientifically this mass diversity extinction? I can, but I don't think I can see it. I can see the way to do that. I mean, like, even if it's just by collecting a whole lot of stuff that will ultimately go extinct, so at least we know what was here once. There's lots of other good projects, conservation projects out there, like the Bishop Museum efforts and the DLNRM efforts.  And those are all laudable efforts, and we need to do that, because some of those will be successful, at least over the short term, and maybe things will change a little bit as time goes by. But the reason I think that we should collect stuff and put them in museums is because I'm ultimately pessimistic that there are biologists who want to do this and there are biologists who probably could do this. There's not enough of them, of course. But is there a societal will to do it? That's the $64,000 question, because without that societal will, which means the money, it'll follow the money. It needs money, and it's not effective. I mean, if you make a comparison to climate change, we seem to have a problem in finding, you know, the collective will to address the phenomenon. And so that brings me to one more question I would like to discuss with you. That is, when you say that at 75%, we, that is, I guess, the human species, is extinct, that's pretty serious. No, I didn't say that. Okay, wait, sorry. Are we at risk of becoming extinct? And how does that work? I think we are at risk, ultimately, because depending on when that 75% mark is reached. I'm not a silly arbitrary number, but whenever that's reached, probably ecosystems are going to be changed dramatically. And we're not just talking animals with plants in terms of what goes extinct. Certain species of plants go extinct, you know, water sheds get damaged. We've still got an expanding global human population that's craving water, and the water's disappearing for not only these kinds of reasons, but because of climate change reasons and so on and so forth. So, like you say, it's all interconnected. And ultimately, you know, it could come crashing down. I think that it is terribly pessimistic to say, but it seems to me that the way that we're going to go extinct is because we're all going to fight each other and kill each other. That could happen a lot sooner. But I think that that's ultimately how we'll go extinct, because, and I don't think technology is going to solve these problems. I think technology is, if people think that that's going to happen, then I think they're in a dream world. So one more thing related to that, you know, the sixth mass extinction you mentioned early, and I saw in the summary of your paper, is different than the previous five. How far did the previous five get before they somehow stopped? And what was the effect on the global environment of each? Have we been sort of stepping down into a lesser environment with each one of these five? What happens is that some cataclysmic change in climate, for instance, or there's a sudden huge volcanic eruption on a grand scale. One of these was, way back in, one of these extinctions was caused by volcanic activity in India. And of course, the fifth extinction, which is when the dinosaurs went extinct, was caused by an asteroid landing in the Yucatan Peninsula of Mexico. That's the generally accepted theory. And that was like 100 nuclear bombs going off and causing huge, huge change in climate as a result of the whole place being clouded over and so on. And that's the basic thinking on that. Other than that one, the previous four mass extinctions were largely constrained to marine environments, at least that defined by the marine environment. So a lot of marine invertebrates going extinct is what defined the previous four mass extinctions. It's thought that those were probably caused by things like volcanism, changing the atmosphere, carbon dioxide levels increasing, acidity in the oceans increasing, but those kinds of earth chemistry changes happening. I'm not an expert in those areas. That's the geologist's domain. But what I know is that actually that's how it will change. I mean, these things resulted in climatic changes, raised temperatures or lower temperatures, and those caused those extinctions. Is it fair to say that the human species is actually a result of these previous extinction stages? Well, of course, because when the dinosaurs went extinct, that made way for abolition of life diversity of larger mammals, of which we're the product. And is it fair to say that the species will survive the sixth extinction or is that so different? I mean, aside from the possibility of war and self-destruction, is that so different? Right, exactly. Is it so profound, the sixth one that we're talking about, you wrote the article about, the sixth one will do us in or ultimately will create an environment in which we cannot survive as the human species? I don't feel qualified to give you a straight answer on that. I don't think anyone knows how it's going to pan out in sufficient detail in terms of what goes extinct, what doesn't go extinct, what environmental changes take place as a result of those extinctions.  Or whether we find the technology, and I don't think that's going to happen, to fix ourselves somehow, to fix the environment, to make it habitable in a good way for humans. So I don't think it's possible to say how it's going to pan out. It won't be for a while though. We're not going to be here anymore. Okay, I told you before we started that I loved biology in high school and all my friends did too. My last question to you, Robert, is it more appealing now than it was? Is biology something that any viewer of this program should consider studying? Sure. There's all sorts of fascinating stuff in biology. For example, you've heard of the microbiome. We've probably had microbiome people on your show before. That's the new frontier in biology, one can argue. We don't understand the vast majority of what the importance of the microbiome is in not only testing our own bodies, but in other animals, in ecosystems, in the ocean. I think there's wide open frontiers in biology. That can be exciting. I've spent nearly 50 years as a professional biologist. But getting on full. To be honest, I've enjoyed every minute of it. And I still enjoy it. I still am fascinated, ultimately, I'm fascinated by animals. That's what it looks like. That's been the driving force of my career. I'm fascinated by animals. It reminds me of the French headline after 9-11. I can't do exactly the right pronunciation. It was something like Newsom's Two Zemelegan. We are all American. The reason it reminds me of that is, I think to some extent, all of us, whether we studied biology in high school, college, or graduate school, we are all biologists. We live in a world of biology and we really have to see it that way. But you can't avoid it. We eat it. We get to do this problem. Thank you, Robert. Robert Cowey, UH Piosciences Research Center. Really appreciate you coming on the show. Thank you. That's been fun. Thank you. Aloha.


When regulators were busy orchestrating a crackdown in every regulated crypto adjacent business, New York Attorney General and everybody else, Fidelity ran towards the fire and turned on their full crypto products for all clients. And that just happened. Fidelity came out and said, look, everybody retail, everybody retail can now purchase crypto. They did that just last week. They ran towards the fire and turned on their full crypto products for all clients, despite continued harassment from progressive lawmakers. Very proud. And also, Fidelity also received a letter from Congress, I believed, saying to not put Bitcoin into retirement accounts. And they said, essentially, we're not going to do what you say. We're a private business. Please leave us alone. And they just went ahead with it. And now they do this again. So Fidelity, tip of the hat to you guys.


It is important to recognize that landscape restoration is about regaining ecological functionality as well as enhancing human well-being. So we are not just talking about carbon benefits or adaptation, but a whole range of benefits that could deliver on both carbon, which is important, but also for restoration to be successful. It has to benefit the local people who depend on these forests or stakeholders who are using these resources for different purposes. I think significant progress has been made since last five years in engaging with the private sector, particularly in terms of clarifying how this approach, the landscape approach, is useful to them and what are the issues and barriers private sector face in terms of investing in landscape approach. Many developing countries in Asia-Pacific regions would like to increase the economic well-being of their people. However, at the same time, this often in the field translates into degradation drivers for forests and pressures for forests. I think after the Paris Agreement, Asia-Pacific forests became getting into the center of the climate adaptation and mitigation strategies. So because of the areas and the important biodiversity that the forest in this region supports, it's important that we look at comprehensive strategies in conserving the forests in Asia-Pacific regions so that we are in a better position to combat climate change.


microbes have been identified to degrade various types of synthetic plastics such as polyethylene, polystyrene, polyurethane, and polyethylene terephthalate, PET. These enzymes are being used to recover valuable materials from plastic waste, making them promising candidates for the development of biodegradable plastic recycling processes. This article was offered by Ren Wei and Wolfgang Zimmermann.


Alina Rabakina vs Victoria Azarenka is the first semi-final for the ladies Miami Open for 2024. Both players had to fight to get to this stage. Azarenka into the tournament as the 27th seed and will get a buy in the first round. In the second round she played Stern who'd been very aggressive the last couple of weeks and very fun to watch. And after dropping the second set, Azarenka would fight to win 7-5-3-6-6-3. In the third round she'd take on Zheng, the number seven seed and Australian Open finalists. This was no problem getting through 6-4-7-5. In the fourth round she'd take on Bolta, the 24th seed who'd just taken out Hedadji Mayer in the previous round. And again, no problem for Azarenka getting through in straights 7-5-6-1 to advance to the quarter-final. In the quarter-finals Azarenka would take on Putt and Sever who'd been one of the surprise packages of the tournament. And after dropping the second set Azarenka would have to fight to win 7-6-1-6-6-3 to advance to the semi-final. Rabakina entered the tournament as the number four seed and will get a buy in the first round. In the second round she'd take on the qualifier Towson and after dropping the first set would have to fight back to win 3-6-7-5-6-4. In the third round she'd take on the qualifier Towson who'd just beaten Mertens in the previous round. And after dropping the second set would have to fight to win again in 3-6-3-6-7-6-4. Fourth round she'd take on the 17th seed Keys who was coming back from injury. And after a close second set Rabakina would get through in straights 6-3-7-5 to advance to the quarter-final. In the quarter-finals Rabakina would take on Sakuri, the number eight seed who she had a real battle with at the WTA finals last year. And this is no different with both players splitting the first two sets and Rabakina eventually winning in 3-7-5-6-7-6-4 to advance to the semi-final. This will play three times or four with Rabakina actually winning all three matches including a retirement victory in Dubai a couple of weeks ago. But the Dubai this round opened last year in the semi-finals with the first set being closed but Azarenka eventually going down in a straight sets win to Rabakina. So if anything to go by that's the match that you should probably look at. Azarenka is going to win this one she's to forget about the head to head and just go after it. Move Rabakina around we know that Rabakina has got some issues it seems like with the ankle problem that she seems to have gotten over the last couple of days so definitely move her around and test that ankle out and just move her around in general because we know that that is her weakness. Rabakina is going to win this one she's to serve well and be aggressive of course standing on the baseline and dominating the points that's where she's going to win this one. There will be a battle on the baseline between these two ladies so Rabakina's going to take over the baseline start with that serve. Very fun match up of course it was great to see these two playing a close match for once in Dubai but I'm going to go with Rabakina in this one in three sets. I think Azarenka has been really good maybe gets a set but I think that head to head especially if Rabakina is playing well which I expect she will be I think she's going to win this one in three but let me know down in the comments below who's making the final.