Here on the channel I've covered a lot of really strong Pokemon for beating 6 and 7 star Terorids and I'd like to say I've had a lot of success with them. In Pokemon Scarlet and Violet, Game Freak really turned up the difficulty rating of these higher star Terorids. Not really. A lot of people struggle with these when the game first came out and a lot of people still do, including myself. You can't simply rock up to a 6 star Terorid with your playthrough Pokemon and expect to walk out victorious. You actually need to train them up and use well thought out strategies, iron hands to even stand a chance against these monstrous Terorid bosses. And this got me thinking, as if mostly used the strongest Pokemon available to beat everything thrown at me so far, could I beat a 6 star Terorid, the strongest Raids in Scarlet and Violet with the weakest Pokemon that exists in the Paladin decks? So this is how I tried to beat a 6 star Terorid with the weakest Pokemon in Pokemon Scarlet and Violet. First off, I need to find what the weakest Pokemon in the Paladin decks was. Using a Pokemon's base star total is always a good measure to know how strong or weak a Pokemon is. So using this method, I looked through the Paladin decks to see what Pokemon had the lowest base star totals in the game. And we found not only the weakest Pokemon on Paladin decks but actually a Pokemon who had the second worst base star total of all Pokemon that existed. Yes, lower than Magic Carp, Cricketot and Caterpie if you can believe that, the only Pokemon with a worst base star total than the one in question was Wishy Washy with a total of 170 base stats. So I had found my powering Pokemon. For this challenge, Sun Kern, the seed Pokemon, ranked lowest out of everything in the Paladin Pokedex coming in with a meager 180 base star total. Sun Kern is literally as weak a Pokemon as they come. But could we beat a 6 star Terraried solo with it? Now the plan is to try and take on a 6 star Terraried solo right? But we are gonna have to set some ground rules to give us some chance of doing this. The 6 star Terraried Pokemon is set at level 75 with a 25 times multiplier to their HP which for 6 star Terraried is actually based off their HP number at level 90 and not level 75. Very complicated. And on top of this they have multiple tools like their shields which even further reduces damage they take and Wish nullifies stat boosts on our side of the field and stat drops on their side of the field so we are gonna need some things to help us out at least. Oh and also, we have to consider the rate timer as well. We only have a set amount of time to beat the Terraried boss which increases the difficulty significantly especially considering every time that we would get knocked out We would incur an additional timer penalty cutting down the overall time we actually have to beat these raid bosses and with using such a weak Pokemon the damage output in regards to the timer itself is something that I'm hugely concerned about. So with this in mind I decide we will only be taking on a 6 star Terraried where we have a type advantage i.e. we are using a Sun Kern, a Grass type Pokemon so we can take on a Water, Rock or Ground type 6 star Terraried. Using super effective damage coming off such a weak Pokemon is the only way this is going to be remotely possible. Next we need to catch ourselves as Sun Kern. I hit straight to Artisan, the home of Gym Leader Brassius, the man obsessed with Sun Flora's the evolved Pokemon of Sun Kern. This town is literally littered with Sun Flora statues and actually has an abundance of Sun Flora walking around it so like any smart Pokemon trainer you'd think this area out of everywhere in the Paldeir region would be the location where we could find ourselves a wild Sun Kern. But yep and if you're like me you'd be wrong. No Sun Kern here. So I find the actual location in this spawn and quickly catch myself a new raid partner. Now to give ourselves the best chance possible I level Sun Kern up to 100 then I head to Montenevere to hyper train it's IVs making sure all of it's stats are set to 31 using bottle caps. I then EV train it using vitamins from the Chansey supply store giving it 25 HP ups, 25 iron and use 2 HP feathers, 2 defense feathers and 4 special defense feathers to max out its EVs. I also buy a modest nature mint to give it a modest nature. Then give Sun Kern the movesets Sunny Day, Synthesis, Growth and Giga Drain. Having growth is a really nice way for us to boost our special attacks so our Giga Drain does more damage. Sunny Day also has the added bonus when active on the field of making growth. It plus 2 boosts rather than it plus 1 when there is no Sun on the field. So this will help speed up our setup. Synthesis also benefits from the Sun being on the field recovering 100% of health when it is active opposed to 50% when it's not. Giga Drain is a main way to deal damage which also recovers health back at the same time. And as we are an unevolved pokemon the EVO Light item is what we have given Sun Kern to hold which gives us a 1.5 boost to Sun Kern's defensive stats which is going to be massive in these battles. As Sun Kern already had the Grass Terror type when we caught it we don't need to change this and it also has the Chlorophyll ability which also takes benefit from the Sun being active on the field doubling its speed stat as long as the Sun is in effect. I mean this probably won't make much difference as it's so slow like its base speed is 30 so even if we double it there isn't much we're going to be out speeding anyway. Solar power could be an option but it wasn't sold on losing additional HP every turn for the extra power trade off especially when we don't have much HP to start with. Oh and I also PP max all of my moves as well which actually comes into play a little bit later on. So with my Sun Kern fully trained we give it a quick wash in our picnic area and then look for our first 6 star terror raid. As we are only looking for a water, ground or rocked 6 star terror raid I use the date skip exploit to refresh our dens until we find a suitable target. After a few resets a 6 star ground terror raid pops up which we head to investigate to see what is housed inside it and what do we find we find a 6 star ground terror type Galganical. To put in perspective of this matchup, Galganical has a base stat total of 500, that's 320 more stats than our Sun Kern, I mean it's not generally even looked at as a special attacker but Galganical still has a higher base stat special attack than our Sun Kern but even with that aside we do have the type advantage so we decide to go head on in anyway. Now as we enter into the raid we get pretty fortunate with our partnering Pokemon here as we are paired up with an Arcanine with Intimidate which helps by reducing Galganical's attacking stat by one stage at the start of our battle. This in turn allows us to take physical type attacks a lot better. First turn we set up our sunny day whilst taking a stone edge which we take pretty well after the Intimidate drop. Now straight away I'm a little bit worried, the worst thing about stone edge is it does have a high critical hit rate so if that does happen it could put a dent in our plans as critical hits ignore any stat drops like Intimidate. But we move on now as sun is set the next turn we start boosting our stats with growth which under sun as I've already mentioned gives us a plus 2 boost in attack and special attack. We proceed to get another 2 growths off maxing out our special attack whilst taking a heavy slam and getting fortunate avoiding an incoming stone edge. With our special attack maxed we are now ready to start our initial onslaught and click in with the gigatrain button. Expecting to do some big damage our plus 6 special attack I am shocked when we do literally roughly about a 30th of the overall health in damage to the Galganical. I now realise this might not even be possible considering we are barely even keeping up with the ray timer. Although we do have the ability to rasterise further on in this battle which will increase our damage so there is some hope. In between a barrage of heavy slams and Galganical setting up its own weather with sandstorm we fire off another 2 gigatrains before we are then able to rasterise. Now I'm hoping we can really see some damage here with the terror boost to our grass type attacks we hit the gigatrain and actually do some decent damage at least in comparison to other damage we've done so far I am yes a little bit deluded at this point. But with that we see Galganical throw up its shield and nullify all of our stat boots while removing all of its own stat drops. So we have to kind of stop the process all over again but since we rasterise we have to make sure now that we don't get knocked out and faint as losing our terror boost will mean this match is completely unwinnable at this point. So we set up our sunny day once again growth boost until our special attack is maxed out and all the while Alcanine is getting knocked out and cycling in and out with those intimidates to reduce Galganical's attack stat which means we are able to take damage from stone edge, rock slides and heavy slams a lot better. After setting up again we are ready this time with our terastalised sunken to finally start our final onslaught. The second setup has really put us in a bad spot with the raid timer and I think at this point that's the one thing I'm worried about. Can we do enough damage in the time we have left? We're doing roughly around a 30th of damage with the shield up right now even though we are terastalised but once it's broken our damage will increase by 25% so that might give us the window to beat the Galganical on the timer we need. Just during the 6 giga drains we finally break the shield and have only 4 giga drains left to knock out this Galganical with very little time left before the raid ends. The first giga drain after the shield drops does the most damage we've done all battle and brings us nearly in line with the timer for the first time since this battle began. We might actually have a chance to do this now. The next giga drain brings Galganical into the red but with only 2 giga drains left it's looking like this is going to be very close.  But at this point Galganical throws up the message indicating the raid timer will end also very soon so we are on a fine timer here. With that I fire off our last giga drain which actually picks up the knockout to beat the 6th star turret and we have finally done it with literally the weakest pokemon in the games with our last giga drain and on the verge of the timer running out we complete this 6th star turret with literally the weakest pokemon that you can access in pokemon scarlet and violet. We definitely had a few things in our favour here especially having the arcanine with intimidate and there was a few stone end misses which definitely helped us out. But we are using a suncurn, a pokemon with 180 base stats in total so I kind of think the things that did go our way are pretty much alright at this point. Well there we go I had done it that's how I beat the strongest raid in the game with the weakest pokemon that exists in the pokemon paldear, skull and violet pokedex. It is possible and it would be fun to see what other pokemon we could do this with in future. If you enjoyed this video please drop a like and if you'd like to see more of these turret challenges please comment down below with what pokemon you'd like to see me try it with next. Thanks for tuning in have a great rest of your day and until next time take care and bye bye.


The Me Black History Month is a means to an end. It's really an opportunity for black people to come together to talk about issues that we face, to talk about how we celebrate being black, literally all of these incredible things that we're able to do during the month of October in the UK to talk about things like what it means to be black and British. I think it's a very powerful way that we can actually sort of kind of unionise and yeah talk about these things that we don't usually get to talk about. The reason why I say that it's a means to an end is because I think mostly with Black History Month it gives a lot of people an opportunity to talk about those things but sort of almost relegate them to only happen within that month and I think that these are conversations that are so important that need to happen kind of throughout the year as opposed to just in one month so things like what it means to be black and queer in spaces that's a conversation that I think is important to happen constantly because I'm not just black and queer in the month of October, I'm black and queer for my whole life so actually having these conversations throughout um sort of throughout the year and being able to talk about those things are just as important so that's why I think that Black History Month to me is incredibly important and a means to an ends in the sense that it needs to um it allows us to have the opportunity to talk about these things and actually discuss and um sort of like educate people on on what it means to be black but equally those are conversations that should be happening throughout the year as well.


My name is James Brock and I work at the AI Consultancy Company Cross Compass in Tokyo. This is my talk, Monadic Parsers at the Input Boundary for PureCons 2022. I'm a maintainer for the PureScript Parsing Library and the examples in this talk will use syntax and type names from that library. This talk is for an audience who has some familiarity with regular expressions and monads. A process running on a computer is isolated from other processes on that computer and from the rest of the world. On that isolation boundary, the process has input and output. The process views its inputs and outputs as either discrete events like signals and mouse clicks or as byte streams. The term byte stream includes any string like thing like file names, web browser, form field values, entire files, or anything else represented in process memory as an array of bytes. We want to talk about byte streams. For output, a process serializes byte streams. Serializing a byte stream is easy. We write a byte stream and we send it. There are no surprises. For input, a process deserializes a byte stream. Deserializing a byte stream is hard. When a process reads a byte stream, it must somehow turn the information in the byte stream into a data structure in the process's native language. Reading a byte stream is difficult because there may be surprises. We expect the byte stream to have a certain structure, but it may not have that structure. A large portion of process bugs, crashes, and security vulnerabilities can be characterized as a process misbehaving when it encounters surprises in an input byte stream. We have many different terms we use to talk about deserializing a byte stream, including decoding, validating, lexing, tokenizing, and pattern matching. These different terms describe activities which are all essentially similar. We will say that all of this means parsing. It is the act of reading and parsing input byte streams that we will focus on in this talk. We will be talking mostly about unicode strings, but everything in this talk will generalize to any kind of byte stream. In the year 2022, here are some common methods for parsing an input byte stream. Write an ad hoc parser based on string splitting and regular expressions. This is how we end up writing a process which misbehaves on surprises. It's easy to make mistakes here and forget to handle certain cases. Use a parser generator like Google protocol buffers. This works great as long as the input is in this format, but that is often not true. Use JSON. Again, this obviously only works if the input is JSON. The reason why such a huge amount of network traffic these days is JSON is exactly because reading a byte stream is difficult. And good days JSON parsers already exist for every language. People would rather mangle their data into JSON than write a custom byte stream parser. And lastly, monadic parser combinators. I'll try to convince you that monadic parsing is the best method for parsing any arbitrary input byte stream. And this is always the first method you should try when you are reading a byte stream from over the process input boundary. I'll read to you from the essay parse don't validate by Alexis King. Consider what is a parser? Really a parser is just a function that consumes less structured input and produces more structured output. By its very nature, a parser is a partial function. Some values in the input do not correspond to any value in the output. So all parsers must have some notion of failure. Under this flexible definition parsers are an incredibly powerful tool. They allow discharging checks on input upfront right on the boundary between a program and the outside world. And once those checks have been performed, they never need to be checked again. Haskellers are well aware of this power. A parser sits on the boundary between your application and the external world. That world doesn't speak in product and some types but in streams of bytes so there's no getting around the need to do some parsing. Doing that parsing upfront before acting on the data can go a long way toward avoiding many classes of bugs, some of which might even be security vulnerabilities. So Alexis King is discussing the abstract idea of what it means to parse something. She does not talk about monadic parsers or any kind of monads at all. Her emphasis is on taking an unstructured input like a byte stream and turning it into a data structure. That data structure should ideally make illegal states unrepresentable. This is a common proverb in the functional programming world. It's only possible to do this in programming languages which have a strong enough type system that the compiler can check your code for you and prove that certain things will always be true and certain variants will hold. If we parse our input byte stream into a data structure which makes illegal states unrepresentable, then by producing an instance of the data structure we have provided a proof that our input byte stream is in some sense legal. The easiest way to do this is with monadic parsers. A parsing monad is a monad with three features. It knows its position in the input string. It can choose alternate parsing branches based on the contents of the input string, and it can fail in the case that the input string is illegal and cannot be parsed. There are many implementations of monadic parser combinators in many languages and all of them have these features. These three features are necessary for a parsing monad and they are also sufficient. Any monad which has these three features is a parsing monad. Let's look at an example of matching a pattern with a monadic parser. Here is the same pattern expressed with a regular expression and with a monadic parser. The pattern which we want to match is a string that starts with a lowercase a character and then has either a lowercase b character or an uppercase b character. Then we also want to capture the b character, whether it was lowercase or uppercase. In the regular expression, we capture the b by surrounding it with parentheses. In the monadic parser, we capture the b character by returning it from the monadic computation. Let's look at the monadic parser computation. It's in the form of a do block. On the first line of the do block, we match a literal a character and then throw it away by binding it to the underscore variable. We don't need to bind it to a named variable because after we've matched it, then we don't need it anymore. Now remember that the parser monad has state inside of it, which tracks the current position in the input string. The act of successfully matching the a character will step the current input string position forward by one character. On the next line of the do block, we match a lowercase or uppercase b character and bind it to a variable named x. The way that we say that x can be either a lowercase b or uppercase b is by using the alternative operator. The alternative operator is kind of like the or operator, which is why we write it as a bracketed vertical pipe character. The alternative operator is a binary operator, which takes two parsers as arguments. It first tries the left parser and if that succeeds, then it returns the result. If the left parser fails, then it tries the right parser and the returns the result of that. So then after this alternative parser succeeds, the x variable will contain either lowercase b or uppercase b. Then we return the variable x from the monad computation. Now let's modify this parser slightly so that instead of returning the captured b character returns a data structure. Let's return a very simple data structure. What is the simplest data structure. It's a single bit. And the single bit contains all the information we need about whether the b character was uppercase or lowercase. So now we've changed the type of parser to return a Boolean instead of a care. The parser returns true if the parsed succeeded and the b character was uppercase. This is an example of what we mean when we say that we want to return typed data structures which make illegal states unrepresentable. There are only two possible ways to successfully parse this string and the data structure which we're returning has exactly two possible values and no more. Recall that I said that a monadic parser needs three features, the state of the current position in the input string, alternative and failure. Let's see what happens when the AB parser fails. We give it an illegal string AXXX and instead of returning right and a Boolean data structure, it returned left with a description at a position for the error. The error says that it failed to parse because it was expecting a b character at position two. When we're parsing patterns out of a string, a common thing to want to do is pattern repetition. Let's try repeating the AB pattern. We added the asterisk quantifier to the regular expression to repeat the pattern many times. We also defined a new parser named AB many. The AB parser uses the many parser combinator to match the AB pattern many times. Let's talk about what we mean by a parser combinator. A parser combinator is a normal pure script function. It is a function which takes a parser as an argument and then returns a new parser. The type of the data structure produced by the new parser may be different. In this example, you can see that the AB parser has type parser string Boolean because it is a parser from a string to a Boolean. We passed the AB parser as an argument to the many parser combinator and the many parser combinator returned a new parser with type parser string array Boolean. The data structure produced by the new parser will be an array of Booleans. So we run this new AB many parser and it matches the AB pattern as many times as it can on the input string and then returns an array, which is true for each of the matched AB patterns which had an uppercase B character. Parser combinators may take more than one parser argument. For example, the alternative operator which we are using in the AB parser to match either a lowercase B character or an uppercase B character is also in fact a parser combinator. That alternative binary operator is a function which takes two arguments, a left parser and a right parser. It returns a new parser which tries first the left parser and then tries the right parser. So parsers call parser combinators and pass parsers as arguments to the parser combinators which return new parsers. This is how we build up parsers for complicated pattern matching. Let's try writing our own parser combinator. Here is a parser combinator, which we have named twice. It is a lot like the many combinator and in fact it has the same type signature. The difference between the many combinator and the twice combinator is that the many combinator will try to match its argument parser as many times as possible, but the twice combinator will match his argument parser exactly two times, no more no less. The twice combinator takes one parser as an argument, which we have named P. The P parser can be any type of parser, which is what we mean by for all a the type parameter for the P parser is named a. The twice combinator will first try to match the P parser and bind the result to the name P one, then it will try to match the P parser again and bind the result to the name P two. If both of those succeed, then it will return an array with P one and P two. Down below we define and run a parser named AB twice with the same input as before. You can see that the AB twice parser matches the AB pattern two times and returns true when the matched pattern has an uppercase B character. So we can see that regular expressions and monadic parsers both solve essentially the same pattern matching problem, but the monadic parser is much longer than the regular expression and has a lot more code. So to add the thing about regular expressions is that they seem like a reasonable and efficient solution for small toy problem examples like these. But when we take on larger and more complex problems the advantage of monadic parsers becomes apparent. That's analogous to the situation of pure functional programming. It's difficult to convey the advantage of pure functional programming with small toy examples because small toy programs are simple in any language. The advantages of pure functional programming become truly apparent when we are maintaining and refactoring and improving large complicated computer programs. In the same way the advantage of monadic parsing over regular expressions becomes apparent when we are parsing more complicated patterns. Let's parse something a little bit harder. How about an email address. We all have a pretty good idea what the format for an email address is. So here is the complete internet engineering task force specification for the format of an email address. Okay, that's a little bit hard. It's not quite as simple as we might have expected but it's not too bad. Let's think about what it says the forward slashes in the syntax mean alternative, which means either the one on the left or the one on the right. The square bracket syntax means that something is optional. So it's okay if that thing is missing. First the specification says that an address is either a mailbox or a group, then it says that a mailbox is either a name adder or an adder spec, then it says that a name adder is an optional display name followed by an angle adder. Then it says that an angle adder is an optional comment folding white space followed by a left angle bracket character followed by an adder spec followed by a right angle bracket character followed by an optional comment folding white space. Or, alternately, it can be an ob's angle adder. And it goes on like this. Can we write a monadic parser to parse an email address? Here's a monadic parser for parsing IETF email addresses written by Fraser Tweedel and published in the Haskell library purebred email. This is in the Haskell language and uses the Addo Parsec parsing library. The syntax for PureScript using the PureScript parsing library would be almost exactly the same. The monadic parser looks a lot like the internet engineering task force specification. Let's compare the specification and the monadic parser line by line. First, the spec says that an address is either a mailbox or a group. The monadic parser says that an address is either a group or a single mailbox. So the order of the alternative was flipped, but that's fine. I'm sure Fraser Tweedel had good reasons for doing that. Next, the spec says that a mailbox is either a name adder or an adder spec. In the monadic parser, I see address spec on the right side of the alternative. And that expression on the left side must be equivalent to a name adder, I guess. There is an optional display name. The optional function is a parser combinator, which does exactly what you'd expect. It will try to match the display name pattern one time. But if the display name pattern is not there, then it skips it. Next, the spec says that an angle adder is this adder spec expression surrounded by angle bracket characters and optional comment folding white space expressions or, alternately, an obs angle adder. The monadic parser says basically the same thing. I don't see the obs angle adder alternative in the monadic parser for angle adder. Maybe we should open an issue with Fraser Tweedel and ask him about this. Finally, the spec says that a mailbox list is either a comma-separated list of mailboxes or, alternately, an obs inbox list. And the monadic parser also says that a mailbox list is a comma-separated list of mailboxes. Again, the monadic parser omits the alternative. I don't know why. The point is that the formal spec for RSC 5322 and the monadic parser implemented in Haskell are very similar. We can see what the monadic parser is doing. And we can ask ourselves reasonable questions about the implementation. Next, let's look at the same RFC 5322 spec implemented as a regular expression. The author of this regular expression claims that it, quote, 99.99% works for parsing RFC 5322 email addresses. And he may be right about that, but how can we tell? The regular expression for RFC 5322 is shorter than the monadic parser, but it's very difficult to read it or make improvements. This is why regular expressions are included in the pejorative Wikipedia article about write-only programming languages. Here's a quote from the article. Write-only code is source code so arcane, complex, or ill-structured that it cannot be reliably modified or even comprehended by anyone with the possible exception of the author. Now, email addresses didn't start out as an internet engineering task force specification. They were intended to be simple and they started out simple. In the 1970s, an email address was a username and then an at sign and then the name of a computer. We could parse that with a regular expression, but over time, email addresses became more complicated as everything does. Monadic parsers will scale and grow in a much more maintainable way than regular expressions and even small patterns written as a monadic parser will be easier for others to read. We often use regular expressions to scan a string and capture all the patterns which we find. Here we want to find all of the integers in the string 10x2y-3 and split them out. We've done this with both a regular expression and a monadic parser. There are a couple of things to notice here. First, the monadic parser for an integer doesn't just match a string pattern and return a string, it actually converts the string to an integer and returns the integer. We're using the int decimal parser which is included in the pure script parsing library. The split cap function runs the int decimal parser on this string and produces for us a fully typed data structure, which tells us everything there is to know about the structure of the input string with respect to the integer patterns in the string. The second thing to notice is that we made a mistake when we are writing the integer pattern for the regular expression. We forgot to think about whether we want to allow negative integers. Now it's easy to change our regular expression so that it will allow negative integers and I'm sure you all know how to do that. What's hard is to take that improved integer regular expression pattern and publish it in a library so that other people can avoid making the same mistake. Of course, regular expression libraries do exist and they contain useful patterns like the email regular expression in which we saw before, but they really don't compose very well. The only way to compose regular expressions together is to concatenate the regular expression strings. This is because again, regular expressions are a whole domain specific language which is embedded in some other host language. Regular expressions don't have any of the composition features like functions and modules that we expect from general purpose programming languages. Monadic parsers on the other hand are just normal pure script functions and they compose very well. We've seen how to compose monadic parsers together by writing parser functions with parser combinators. Remember that the term parser combinator just means a function which takes some parsers as arguments and then returns a new parser. There are many other tricks we can do when we're using monadic parsers for pattern matching. There's one more trick that I want to mention in particular and that is matching recursive patterns. Regular expressions famously cannot parse an input string which has a recursive or tree-like structure. That means that regular expressions cannot parse HTML. They cannot parse JSON. They cannot match balanced parentheses. All of these things have a recursive tree-like structure. Here's a monadic parser named balance parens which matches a balanced group of parentheses. It will pair each open parenthesis with a closed parenthesis and capture the group when the last parenthesis closes. The way we write a monadic parser to parse a recursive structure like this is that we write a recursive monadic parser. You can see that the monadic parser calls itself on the second line and that is how it tracks its depth in the parenthesis parse tree. I'll read to you from the introduction to the paper Parsec Direct Style Monadic Parser Combinators for the Real World by Dan Lyon and Eric Meyer. Parser combinators have always been a favorite topic amongst functional programmers. Merge already described a set of combinators in 1975 and they have been studied extensively over the years by many others. In contrast to parser generators that offer a fixed set of combinators to express grammars, these combinators are manipulated as first-class values and can be combined to define new combinators that fit the application domain. Another advantage is that the programmer uses only one language, avoiding the integration of different tools and languages attributed to Hughes 1989. I want to repeat one of the key points about monadic parsers. They are written in normal pure script. Parsing input is such a hard problem that when people want to do it, they traditionally use a whole domain-specific language for parsing. The most famous domain-specific language for parsing is regular expressions, but there are many others. There has been a long tradition of general-purpose languages which are so weak that it's impossible to write anything in them which is slightly hard, like parsing an input stream. The whole point of the Perl programming language is that it's a weak, imperative style language with regular expressions built in so that we can use regular expressions for parsing input byte streams. That's the whole point of Perl, but it doesn't really solve the problem in a satisfactory way. When our computer program consists of two different languages, then we have the usual problem of language interoperation and the usual solution to language interoperation is to pass strings. A regular expression can capture a pattern in a string, but then it returns the captured pattern back to the host language as a string. And then what do we do with the string? We still have to turn the captured string into a data structure. Remember that we looked at the problem of extracting integers out of some input string. We wrote a regular expression which found integer-looking substrings and we ran it on the input string. The regular expression found some matches and returned the captured substrings. Suppose we then ran a string to integer conversion function on a captured substring and the string to integer conversion function failed. What then was the captured substring a legal integer string or wasn't it? In monadic parsers, we turn the string into a data structure in our native language during the parse. So there is no ambiguity about whether or not the input string was legal. In this case, the data structure is an integer. That's a very simple data structure, but it is a data structure. If we have a thing which is not an integer, then we can't represent it as an integer. So producing an instance of the integer data structure provides a proof that the input string was legal. Monadic parsers allow us to match patterns in normal pure script instead of using a domain-specific parsing language like regular expressions. And after we have matched a pattern, we produce a data structure which preserves the proof that the input string was legal. Here is a type for a monadic parser. This is an excerpt from the 1998 paper, Functional Pearls, Monadic Parsing and Haskell by Graham Hutton and Eric Meyer. On the bottom line, it says that the type of a parser for a data type A is a function from a string to a list of pairs of an A and a string. The simple type definition tells us pretty much everything we need to know about monadic parsers after we spend some time thinking about it. Like all good math, it has a simple definition, but complicated and far-reaching implications. Modern monadic parser libraries usually don't use this exact type definition for a parser, but they use definitions which are equivalent. The essay, Revisiting Monadic Parsing and Haskell by Veebab Sagar has some good discussion about that. And if that last definition was too prosaic for you, then here is the same definition expressed as a poem by Fritz Rohrer, Dr. Zeus on parser monads. A parser for things is a function from strings to lists of pairs of things and strings. Okay, that's enough theory. We'll stop at the Dr. Zeus level of parsing theory. We don't actually need to know any theory to use monadic parsers, but now you know that the theory exists and that the theory and techniques have been pretty well established since the 1990s. So in a JavaScript runtime environment, you can expect a pure script monadic parser to run at least 10 times slower than a JavaScript regular expression. That's just how it is. And that situation probably will not improve much in the future. If your input byte stream will be large and you need to process it quickly, then you might not be able to use pure script monadic parsers. But all of the techniques we talked about here are also used in Haskell. There are Haskell monadic parsing libraries such as Addo Parsack, which run very fast. About as fast as regular expressions, sometimes faster. So if you learn these monadic parsing techniques, then you can apply them in other execution environments very well. Whenever your process receives a byte stream from the world beyond the process input boundary, the first thing you should do is to parse that byte stream into a data structure. Monadic parsers are the easiest and most effective way to do that. Unless you already have a parsing library for the specific format of the byte stream or you are under severe performance constraints, the first technique you should consider for parsing an input byte stream is monadic parsers. Thank you very much for listening to my talk. Oh, here's a question from Toastal. Has the performance of the parsers in pure script improved recently? I tried to use a lib from CSV, but it crashed my browser because of pure scripts parser being slow. No, they haven't really improved and it's hard to improve them. I've been working on that. I've tried some different things, it's difficult. There are actually two monadic parsing libraries in pure scripts. There's pure script parsing, which is what I'm the maintainer of and which I've been talking mostly about today. There's also another one called pure script string parsers. The main difference with pure script string parsers is that it does not use monad transformers, which makes it faster. And so if you have performance problems, you can try using that one. It will run a little bit faster, but really regular expressions in a JavaScript execution environment are just gonna be faster because there's a whole just in time regular expression compiler that compiles regular expressions in JavaScript down to very fast code and runs them. And we don't have, there's no equivalent jit compiler for monadic parsers. So in general, monadic parsers don't have to be slower than regular expressions. They just, they are for historical reasons because Google and the WebKit developers have spent just years and years of programmer time and millions of dollars in programmer salaries optimizing regular expressions. And regular expressions in other libraries have been optimized for decades and decades as well. And they're super fast now. Monadic parsers can be fast. In many cases, they are fast. The Addo Parsec library is fast. Like I said in the talk, it can be as fast or faster than regular expressions. In JavaScript runtime environment, that situation is not gonna get better anytime soon. Okay, so let's go to another question. So James Collier asks, can monadic parsers also parse non-regular languages like context sensitive grammars? Yeah, it's a really good question. I wanna talk about that. Let me ask, let me answer James's other question first. So his question, so his other question is recursive monadic parsing isn't complicated by strict evaluation? It is not, it is not. It's not complicated by strict evaluation. That's a really good question though. It's a very, very good thing to ask, especially when you're coming from Haskell into PureScript, sometimes you get bitten by strict evaluation. But in general, no, it's gonna be fine. The place where it would really bite you is with the alternative operator. If it were going to, if you don't want your, you don't want because alternative operator is a function and PureScript is strict in evaluating. It's in for functions, which means it will fully evaluate all the arguments before it calls the function. And so if you have an alternative operator which fully evaluated the left parser and fully value out of the right parser and then, you know, called the function, like wouldn't that mean that both parsers get evaluated? Well, no, it doesn't because it fully evaluates the parser, but it doesn't run the parser. So all the semantics of monadic parsing in PureScript work exactly how you would expect them to work if you're coming from a lazy language like Haskell and Haskell monadic parser libraries. Another question. Oh, your other question was, can monadic parsers also parse non-regular languages like context-sensitive grammars? So let me get back to that in just a second. Let me see what other questions there are. In Raku, you can have recursive regex patterns. Yes. And, oh, yeah, right, sir. And that's an extension, but it's an extension that makes the regex parser not regular. So like, you're getting none of the advantages, like you're losing a lot of the advantages of regular expressions that they can be equivalent to a finite state automata, but then you're getting the disadvantages of regular expressions, which is the syntax. So like, yeah, you kind of get worse of both worlds with recursive regular expressions. Grammars are interesting too. In Raku, that's cool. Thanks for the link. I'm not familiar with Raku. Does that mean we can mix in regex for speed? Yes, you can mix in regex for speed, especially the PureScript string parsers library in PureScript has a regex parser. And I have an issue on PureScript parsing because I wanna add a regex parser into PureScript parsing so that you can call regex in the middle of a monadic parser. It's a really good feature. You can do that in PureScript string parsing. You'll be able to do it in PureScript parsing very soon. What about a monadic parser combinator library that compiles to regex from Joseph Young? That is, so there's a Haskell library which is called applicative regex. No, regex applicative. It's called regex applicative. It is super, super interesting. I can't remember the name of the author off the top of my head. But basically what it is, is it's a regular expression library, but it's written in terms of applicative combinators in Haskell. So it's not monadic, instead it's applicative. Applicative is a slightly weaker algebraic structure which is kind of like a monad. But in applicative computations, you know the shape of the computation in advance as you do with regular expressions.  You can use an applicative and that's what the regex applicative is all about. And that library is very, very interesting.  Why do all parsers have that byte to, so T-Rex, why do all parsers have that byte to tuple type? Because, I'm not sure what you mean by that. A lot of the examples I used in the talk were the care parser which parses one byte. Could you rephrase that question, please? I'm not sure you mean by that. Severe performance constraints. Yeah, okay, I talked about that. So, okay, I wanna talk about, I wanna go back to James Collier's other question about if a monadic parser can parse a context sensitive grammar. What does he mean by that? He's talking about, oh, let me share my screen here. Can you see this, am I sharing? Yes, this is sharing. Okay, he's talking about, really what he's talking about is this, the Chomsky hierarchy. Everybody here familiar with Noam Chomsky? This guy, he's super famous. And this is what he is famous for. The Chomsky hierarchy provides a hierarchy of grammar complexity. And regular expressions can parse, yes, Noam Chomsky. Regular expressions can parse regular languages which are type three, the weakest level on the Chomsky hierarchy. Monadic parsers can parse the next level up, type two, context free grammars. Because they're normal functions, they can be recursive, they can call themselves like any normal function in PureScript. And because they're recursive, then they are effectively the same as a non-deterministic push down automaton. A push down automaton is just another name for the data structure known as a stack where you can push things and then pop things. And your call stack becomes the data structure which provides the push down automaton capability and then you get type two. So you can parse type two, context free grammars. Now there's a way to get to type one with monadic parsers too. And that is through monad transformers which is what Jordan's talk was about. If you have a parsing library, I didn't talk about this during the talk but all the parser types in PureScript parsing are monad transformers. And you can add, which means you can add new monad capabilities to your parsing monad. And you can, which means you can bring in any context into the computation that you want. Any kind of monadic capability like a state monad, you can transform your parser monad with a state monad and then you can bring in some state context into your computation. And then you can use that context that you've brought in to make decisions about your parsing. And that makes your parsing context sensitive and then you can parse type one grammars using monadic parser combinators. Type one grammars include most computer programming languages for instance. So if you want to parse a computer programming language you will need a parser that can parse type one grammars and monadic parser combinators with monad transformers can do that. Any other questions? Oh, T-Rex question. Type parser, a string equal, parser is a function from strings to lists in pairs of strings and things. You said this always holds true and is proven. Why is it true? It's true, it's not, it's not exactly a theorem. It's a type. And so that if you have, so this type it's this type if you have a parser which has this type then it gives you all the capabilities that you need for a parsing monad. It gives you alternative failure and parsing state. So that's why that's a parsing monad. And like I said during the talk that's not actually the exact type which is used in which is used in pure script parsing but it uses a type which is equivalent. And the best discussion of this is Veebh Segar's essay revisiting monadic parsing in Haskell. It's a really good discussion for this question. Aditya says for a moment I was wondering when Noam Chomsky became a mathematician. Yeah, he kind of is a mathematician. The reason he's so famous, the reason he's the most cited scholar living alive today and the most famous public intellectual in America is because he brought this mathematics, this mathematics of computational logic into the field of linguistics and applied it and began answering questions which no one had ever been able to come up with good answers before. Noam Chomsky actually thinks that the difference between humans and animals is that human brains are capable of, are essentially Turing machines that they have a grammar generation organ which is subject to the fundamental theorem of computer science which is, you know and that's really what Noam Chomsky is all about. That's why he's super famous. Yeah, you should go down to Wikipedia rabbit hole about that, it's super interesting. Let me show you some stuff here. So, let me show you an example of what it looks like to pull in context. Actually, I don't know, maybe my question and answer session is going over here. Aditya, tell me if you want us to go to the next talk, okay? So, this is from the documentation for my Haskell megaparsec version of the replacing, the parsing replace library. This replace library is a library that I've written three times and I alluded to it in the talk. It's not part of the basic parsing library. It's not part of the basic monadic parsing library. It's an add-on library which provides some extra features. I basically wrote this library by going through the Python RE module which is really good and it's about regular expressions and provides all the features that you can do for regular expressions in Python. And it's really ergonomic and really useful. And so I just went through this whole library and made sure that everything you can do with regular expressions in Python you can also do with Haskell or PureScript. Every time I found something that you couldn't do then I added it to this family of libraries that I wrote and published it. There's three of them. There's PureScript parsing replace and then there's also Haskell libraries replace megaparsec and replace adoparsec for those parsing libraries. And so from the replace megaparsec library this shows you how you can pull in a state context into a monadic parsing operation in order to provide in order to parse context-sensitive grammars in order to solve context-sensitive parsing problems. And here, and as you maybe remember from Jordan's talk you apply a monad transformer and you pull in a state and then you just stack your parsing you use that as a base monad for your parsing monad and then you have the state available to you while you're doing the parsing computation. And this allows you to solve this allows you to do the same thing that you would in parsing resubn. So in Python resubn it performs the same operation as subn and returns a tuple which tells you the number of substitutions that you made. So what is sub then sub is search and replace it searches through a string replaces everything but you can also tell it to stop after a little while and you can say you only wanna do a certain number of substitutions and stop after that and then report back after you've made the substitutions. And in Python, they had to provide a whole function in the library which is this resub function or actually the resubn function. But with these monadic parsing libraries with monad transformers we don't need to provide a library function we don't need to add anything to the API. This is just an example which shows you how to do it because monad parser transformers already give you all the capabilities you need to do an operation like that you just have to but it helps to see an example it's hard to figure it out if you've never done it before. So there's an example of that provided in replace mega parsing and there's also an example on the pure script in the pure script parsing replace library. So I think I'm gonna stop there that's all I have to say did I miss any questions while I was talking? Oh how easy is it how easy is it to parse binary data in pure script? Great question. Super easy, super easy on the pure script parsing library go down here related packages, pure script parsing data view if you wanna parse binary array buffers you can use this library here which goes with pure script parsing. Okay before we move on just there's actually a question that James I think you're gonna have to take this question James Collier was asking regarding Jordan's talk and one second. Yes, James Collier was asking on YouTube regarding Jordan's talk is the state T transformer related to the ST monad? Uncle? Is the state T monad transformer related to the ST monad? Oh, that's sorry that's a monadic transformer talk. Jordan do you wanna take that one? You can take that one too, James. Okay, no it's different that's confusing because they sound the same but they're different monads. ST monad is like an effect monad for when you just wanna have some local effects and do some mutation. ST monad is basically a performance trick that you can do if you have an algorithm you wanna do for and you wanna do some local mutation in a little localized area like an isolated localized area in your program where you do mutation and then you get the result out of that that's what the ST monad is for and then the state T monad is a monad transformer for carrying state along in a monadic computation.


My name is Lachlan. I'm a Lummel, I'm a man. Being a First Nations person, you know, being connected to the land is just, you know, it's in my DNA. And having a job that I can help preserve the environment for, you know, many generations to come, that's why I'm so passionate about working in this role.   It's amazing. It's a lot more than just sitting on a tropical island. Us being rangers, we're also jack-of-all-trades, so we work on machinery, pest management, acid management, being bush tradies, getting in the water as well. We're scuba diving, we're snorkeling. I have the privilege of working with, you know, all of my mob as well, because we have sea country that also covers the region that the department works on as well. It's important for First Nations like myself to work in these roles, because we come with that extra wealth of knowledge we passed down from, you know, 40,000 years. As a department, we're working together with a lot of First Nations groups because our ultimate goal in hand is for every traditional owner to manage and work on their own land and take care of their own lands. Making sure that we have a platform where we can be heard loud and clear.


This research examined the use of silver nanoparticles stabilized by exopolysaccharides for the degradation of two common textile dyes, methyl-orange and congo-red. The results showed that these particles are effective at facilitating the degradation of both dyes, indicating their potential as a green and cost-effective method for treating contaminated water. This article was authored by Chinashanmigam Saravanan, Rajendraan Rajesh, Thanamgam Kavyarsan and others.


Next we are going to study circuits with capacitors and inductor, when it is a DC supply inductor is zero resistance path and capacitor is an open circuit but with AC they are different. So there is one easy way to analyze the alternating current circuit that uses a mathematical concept called phasors. So this is just a brief introduction, we are not going to too much of detail of phasor like what it is and all that, we just talk about what all things are useful with respect to phasor and that is it. So phasors are nothing but rotating vectors, they are rotating vectors. One thing is finding the average value and other is to get the exact value as a function of time. So now when you draw a voltage on x and y axis you get a wave sort of thing. So you cannot just draw waves and it becomes very easy to convey the meaning of the wave. So phasor is the easier way to convey what do we mean by Vm sin omega t or Im sin omega t plus pi and all that. So if there is a vector that starts from this axis, if it rotates with angular velocity omega this angle will be what? Omega n to t, fine. This vector just keeps on rotating, alright. You will see that after time t if you take its projection on the y axis you will get the vector magnitude times sin of omega t, fine. This vector could be voltage, could be current. Let us say this is voltage whose peak value is V0. So this vector is denoting the peak value, the length of the vector is the peak value of voltage or current, getting it? So if this is voltage this length will become how much? V0 sin omega t, getting it? So it becomes easy to represent. We will say that the rotating vectors projection on the y axis is the voltage that is going on, fine. Suppose current is I0 sin of omega t minus pi by 2 then how will you represent here in the phasor? It will be 90 degree behind. It will be like this 90 degree behind this so like that you will have an idea. So this is current, right now current is behind the voltage by 90 degree, okay. So we are going to, I mean that is it, okay. We are not going to too much of detail of phasors. So we are going to use this particular knowledge to analyze the circuits further. Any doubt on phasors? Write down, inductor in AC voltage, inductor with alternating voltage, okay. So if you have inductor, inductance is L, V is equal to V0 sin omega t, like this. You need to find same thing, like VRMS, IRMS, average power V is given I, these five things. This thing is already given, this is V0 sin omega t. You need to find other four. Try to write Kertschoff's equation, the potential difference across inductor is LDI very deep. Then you will have to integrate and all. Let us see, all of you got this V0 sin omega t minus LDI by dt is equal to 0. What is this? Then you will get LDI by dt, this DI is V0 by L sin omega t dt, okay. This is DI, this is not I, okay. So I will become what? V0 by omega L sin omega t plus a constant, we do not know the limits, okay. But one thing is pretty clear, average of voltage is 0, so average of current should also be 0, fine. So when you take average of current, you will get what? This becomes 0, so this becomes constant, so that should be 0, constant should be 0. Oh yeah, yeah, yeah, yeah, yeah. And minus actually, but that minus should only be direct, okay. Now first back down this, the average of current should be 0, so constant is 0, alright. So I get current as minus V0 by omega L plus of omega t, fine. This thing, if you compare with voltage, voltage is what? V0 sin omega t, if you write down in terms of sin, we get V0 by omega L sin of omega t minus pi by 2, yes or no? So current is behind the voltage by pi by 2 or voltage is ahead of current. So current you can write down here as, and one more thing I will tell you, this is sin of omega t minus pi by 2. This thing, omega into L, is it behaving like a resistance? If omega, if omega L is large, current becomes small, so it behave like a resistance but we cannot call it resistance. So some rhyming term we call it, we call it reactance, fine. So reactance are two types, capacitor and for inductor. This is capacitive reactance, that is equal to omega L, yeah, inductive reactance. And Vrms will be what? V0 by root 2 and Irms will be what? This is again sin only, if you square it, it will become V0 by root 2 times omega L, isn't it? What about power? Average power is how much? How much? 0. 0 is what? Instantly, this power is V into I, V is V0 sin omega t, I is minus V0 by omega L cos omega t. You will get minus V0 square by 2 omega L sin 2 omega t, sin omega t cos omega t divided by, I mean, that into 2 is sin 2 omega t, okay? When you take average of this, it becomes 0 or not? So if it is pure inductive circuit, it will not consume any power, right? Now can you represent in phasor voltage and current? If you say this is voltage, where will be the current? 90 degree behind, like this. Both will rotate with same angle of velocity, omega. Can you doubt? See, Vrms into Irms is incidental, it is not a formula that Vrms into Irms should be power. It happens to be that when it is pure ray and resistance. And one thing is this, that this inductive reactance can change with omega. That is something weird because it is like changing resistance with frequency. It is a function of frequency. You can change the resistance with frequency and it makes sense. What is it? Omega means what? Rapidly the current is changing or rapidly the voltage is changing. So inductors should resist it more. That is why its reactance is increasing. Now write down capacitor with AC. For C, try to find out all of those things. So if charge is Q on 8, the potential difference will be Q by C. So the loop rule will say V0 sin omega t minus Q by C is equal to 0. So I will get Q equals to C V0 sin omega t. How much is the current? DQ by dt. So current will be DQ by dt. That will be equal to C times omega V0 sin omega t. This you can write it out as you can write this down as 1 by omega C of omega t. So 1 by omega C behaves like a resistance. This time it is capacitive reactance 1 by omega C. Just to show that it is like a resistance. This is capacitive reactance. You can write this down in terms of sin as V0 by XC into sin of omega t plus pi by 2. So now you will see that current is ahead of voltage by 90 degrees. Earlier current was behind. So this is I and this is V. So we will have I RMS as V0 by root 2 times XC. V RMS as V0 by root 2. What is the average power? So it will be this with current into voltage. Again sin 2 omega t will come. Average power will be 0. So if you draw the phase diagram and you say this is voltage, where will be the current? It will be ahead of voltage. This is current. Both of them are working with a measure. Can I doubt? Yes. So these are the basic circuit elements. The basic circuits. Only resistance, only capacitor, only resistance, only the inner things. Now we will be combining them. But before we do that, let us solve few questions. No doubts on this. Write down a pure inductor of inductance 25 millihenry. Inductance is 25 millihenry. It is connected to a source of voltage 220 volts. Find out inductive reactance XL and RMS value of current if frequency of source is 50 hertz. If I do not say anything, it means RMS. Every time in a question, if it is not mentioned, what it is, it is RMS. How is it? How is it answered? XL. What is the formula for XL? Omega L. Omega L, how much is it? 2.2. 2.2? How much is that? 2.2. Omega is how much? 7.8. 7.8. Unit? Omega is 7.8. Not omega, XL. It forms. Because V naught by that is current, right? Yeah. So V naught by anything that is current means it has to 2.2 volts. You got it? 7.8. Omega is 2 pi into frequency. This into L. This is 7.85 ohms. So frequency into 2 pi is omega. Do not directly use frequency as omega. What is IRMS? 2.2 by 8. So 2.2 by 8. 7.8 is approximate. Approximate. So 2.2 by 8. Approximate, huh? 2.8. Is it 2.2 by 8? Approximate. Approximate. This is exact number. This is 28m. This is the RMS. Okay. This is a theoretical question. Tell me. A lamp is connected in a series with a capacitor. Suppose you have an inductor like this, draw this. You have an inductor and there is a lamp that is connected like this. There is an AC supply. So lamp will glow. Okay. Now what you are doing is you are putting an iron rod inside, inside the coil. What will happen to the glow of the bulb? Increase, decrease, remain same. Iron. Iron is not touching anything. What will happen to the glow of the bulb? bulb is glowing because of what? Why it is glowing? Because it is consuming power. I square R. What will happen to I square R? R will not change. So what will happen to current? If current increases, glow will increase, current decreases, glow will increase. What will happen to that? This is what is the problem. You are not. Why? Because reactants will increase. Reactants will increase. The L value will increase or not? L will increase. So omega L will increase. Omega L increases, reactants increases. So current decreases. Global decreases. Next question. A 15 micro farad capacitor is connected to 220 volt 50 hertz supply. Find out capacitive reactants and the current. RMS and the P. This is like the basic question so that you know you are able to. These are the questions which will help you to get familiar with the concept. Once you get familiar, then you have to solve those XC vermin stuff. How many XC? 222. Who will calculate? After writing. Sir XC 222.21. 212. Yes 222. So I have the answer. 1.0 is I have the 1.0. Omega has got 2 pi into F. Yeah. Into C 15 into 10 is power minus 6. Yeah. You know again I am getting the 222. This is 10 raised to power 6 divided by 2 into 15 is 100. So this becomes 10 raised to power 4 divided by 15 pi. So it will be 100 divided by 15. Into 100 divided by pi. So this is like 33. something and this is how much? It is like 7. So 7 into 33.3. I mean this is approximate okay. 33 into 7. 7 is the 21, 21, 22. It is a rough calculation. The answer is 222. What is IRMS? IRMS is nothing but 220 divided by XC. That is 1. 220 divided by 212. This is rough. The exact value is 212. So it is 220 divided by 212. Okay. 1.0 at Konbola. If I got 298. I see. You have evaluated. Okay. Rough what you are doing. Don't do anything like that. Answer is 1.04. Peak current is how much? Peak current is root 2 times of this which is 1.47. Now tell me what will happen if you increase the frequency. If you double the frequency what all things will change? XC will become how much? XC will become what? If it is right now 212. What will become if you make omega 2 omega? XC will be 212 divided by 2. Yes 1 of 6. Right. And current will double. Yeah double. Fine. Just by changing frequency you are able to increase the current. But then at our home there is a fixed frequency of current that is coming in. That is 50 hertz. You don't usually change the frequency.


In this video I will give you a short overview of the Prism Pipeline. Prism will automate the complete workflow of your animation or VFX project. We will start by creating a Prism project, then we will create Assets and Scene Files. We will export objects between different software packages and finally we will render out a shot and create a video file from that. In this demonstration I will use 3ds Max, Maya and Toudini, but you can use whatever software you like which is supported by Prism to follow this demonstration. To download Prism go to prism-pipeline.com and go to the Downloads page. I already downloaded Prism to my desktop so I can execute it from here. To install Prism you only need to follow the instructions of the installer. During the installation of Prism this window will pop up where you can select which components of Prism you want to install. By default Prism detects which software you have installed on your system so the default settings should be fine in most cases, but if you want to install Prism for a different Toudini version for example you can double click the path and select a different Toudini version. I click install and wait for the installation to finish. After the installation we can open an existing project or create a new project and here we can enter a name for our project on the path where we want to save it. When creating a project there are some more options but for this tutorial I'm not going into detail. You can read the tooltips for more information but for now the default options are fine and we can create the project. Now we want to create our first scene file and we can do that in the project browser. When you open the project browser the first time you have to enter a name which is used to identify who created a scene file. Now we are in the Prism project browser and here we can create assets, shots and scene files and later on we can also compare renderings. In this tutorial we will create an antelope walking through an environment so the first thing we want to do is to create an antelope asset. We do this by double clicking in this asset hierarchy and here we can create an asset or folder. Folders are used to group multiple assets and I will create a folder called character and when I double click the folder I can create a sub folder or an asset in this character folder and here I create my antelope and when I have the antelope selected I can double click in the steps list to create a new pipeline step and I will start with a modeling step and now I can right click in this files list to create a new scene file and I will create an empty 3ds max file and I can open it by double clicking this version. Here we are in 3ds max and the scene is already loaded so we can close the project browser which opened on startup. We can start now to model our antelope and to save a new version we can use the prison menu up here and click the save version option. We can open the project browser to see our versions and there's also an option save comment which lets us add a comment to our scene file so we can remember later what we changed in this version and now in our project browser we can see our new version with the comment. I finished the modeling of my antelope here and now I want to export it to Maya where I want to rig it and animate it. Imports and exports in Prism are handled by the state manager which I can open from the prison menu up here and in the state manager I have two lists one for import and one for export. In each list I can create multiple states for example in the export list I can create an export state by clicking on this button. I also can create states through the context menu for example a playlist state and when I select a state in this list the parameters are shown on the right side of the state manager. For now I only need the export state so I delete my playlist state and here I have to set a task name for my export for example antelope gale and only objects in this list are exported so I will add my antelope here and now I have to publish my scene. On a publish all states in this export list gets executed. I add a comment for example first export and press publish. Now this state was executed and I can switch to Maya. Here in Maya I have a prism shelf where I can access all my prism tools and now I want to create a rigging state and a scene file so I can rig my antelope for that I select my antelope double click in the steps list and create a rigging step. From the right click menu I create a new Maya scene file now I want to import my object which I exported from 3ds max and I can do this in the state manager. Here I can click on the import button to create a new import state and this will open the select state dialog where I can see all my exports. Right now I only have one export and I can import it by double clicking on this version and here is my antelope and I can start rigging now. I can save my scene to a new version by clicking the save button in the prism shelf. I finished the rigging of my antelope and now I want to import it into a short file where I want to animate it. For that I have to export my antelope rig and I can do this in the state manager. Here I can create a new export state and set a task name for example antelope rig and I want to export it as a Maya file so I can reference it into a short file and I want to export all objects so the whole scene and now I can add a comment for example rig export and publish my scene which will export my rig. The next thing I want to do is to create a shot and I can do this in the project browser. Here I switch to the shots tab and create a new shot by double clicking in this shots list. I can add a sequence if I want. I'm going to sequence a and the shots out in. I can set some more parameters but in this example I don't need it. Here I will add an animation step and automatically create a category. For example if I have multiple characters in this shot and I want to have different scenes for background characters and foreground characters I could use a second category but I don't need it in this tutorial. Now I can create an empty file in the files list here and now I want to reference my rig in and I can do this in the state manager. Click import and right now we are in the shot step so we don't see anything because we didn't export anything from the shot. We have to switch to asset and navigate to the antelope and here we see our antelope rig task and the version which is a Maya file. When we double click it we get a pop up and yes we want to create a reference. I will also add an environment in this scene and I will use an environment from an older project. I can use the import custom file to select files which are not in the project yet and here I have an environment where I want to animate my antelope. Here I have a scene with an animated antelope and now I want to export it to Houdini where I want to render it. Again exports are handled by the state manager and I will create a new export state. I set a task name antelope unname and because I want to export an animation I have to change the frame range here. When I check this global checkbox the state manager will use the frame range down here and I only want to export the first 40 frames which is fine and now I have to select the object I want to export and because I want to export it to Houdini I have to use this option here. Maya right now is in centimeters and Houdini works default in meters and with this option Prism automatically handles this unit conversion. I set a comment here and I can publish the scene to export my animation. Prism now gives some warnings because some assets are not in the project folder but this is okay for now. Now I can switch to Houdini. Here in Houdini I want to create my render scene file and for that I select my shot and double click in the steps list to create a render pipeline step and I can create here a new Houdini scene file. I create a new geonode and call it antelope and I also create a second node and call it environment. I can go into the antelope node and open the state manager and I want to import my animation. I click on the import button and here I can select the shot and select the animation I exported from Maya. I double click it to import it and here I can see my animation. It's fine the first 40 frames and now I also want to import my environment and I use the import custom files option for that because the environment is outside of the project folder and because it's in the wrong unit because it wasn't exported with prism I have to scale it manually. Here we are and now I can apply shaders to my objects. I added materials and the light to my scene and now I want to render the complete animation and for that I will use the state manager again and in the export list I will create a render state. I can do this by clicking on the render button to create a mantra or a redshift state. This will create a new node in Houdini but I already have a redshift node here. I created it manually so I will use a states from node feature to create my render state. Here I can set a task name and a load render and I don't want to submit a render job so I can ignore these parameters here and I have set up a few render passes in my redshift drop already and I don't have to set any output path prism will handle it automatically. The frame range I want to render is 2040 so the comment and when I publish my scene now Houdini will render this state and save the images into the project folder. Prism displays some warnings here because I have some external textures but this is okay for now and now I have to wait until the render is finished. The rendering is finished and now I want to composite my render passes here in Nuke. Here I have a prism menu and a write prism node which we will use later but first I want to look at my rendering. I open the project browser and when I select my shot I can see all renderings down here which were created from scene files in this shot. I created a second version with different lighting and I can scrub the images here and I can also watch at different render passes and when I double click the preview I can open it in a V or in a different media player and when I select multiple versions I also can compare them in a V side by side and for now I will use the left version for compositing but first I need to create a compositing pipeline step. I double click in the steps list to create it and I create an empty Nuke script and the project browser closes because the default option close after loading is enabled. I navigate to my rendering which I want to import and right click on the preview and here I can import images and this gives me different options what I want to import. I can import the current layer but I want to layout all passes and this lays out all render passes and composites them together so I have complete control over different elements of the shot. For example I can lower the fog a bit or apply a color correction to the diffuse and when I'm happy with the result I can create a right prism node and here I can set a task name I call it main and now I can press render to render out my final shot. The rendering in Nuke is finished and now I want to see the result. I can click on the prism tray icon to open the project browser and here I can navigate to the task I created in Nuke and Nuke created an XR sequence which I can now import into my editing software or in this case I want to create a video file from this. I can right click on the preview and select convert mp4 and this will create a video file which shows up in the versions list. Here I can open an explorer and here I have a video file of my final shot. This was an overview of the prism pipeline but there are a lot more features which will speed up your workflow and make your life a lot easier. Prism is free but if you find it useful please support the future development with a little donation on prism-pipeline.com. You can also find the documentation and more tutorials there. Thanks for watching.


A couple thousand years ago, the ancient Greeks decided that all languages, besides ancient Greek, sounded like bar bar bar bar bar. So they started calling the people who spoke them barbarians. Or at least that's the popular story about where the word comes from. There's actually similar words in Latin and Sanskrit, so the word probably goes all the way back to PIE. But the point is, the Greeks really did refer to everyone who didn't speak Greek as barbaros, and they really did think of them all as barbarians. After all, from their perspective, ancient Greek just sounded right, and all the other languages sounded weird and wrong, and if they couldn't see that, then it must be because they're stupid, smelly, uncivilized barbarians. You'd think that after all this time, we would have figured out that people who speak differently than you aren't just doing it because they're dumb, that whatever people are raised with winds up sounding correct to them, and that no one's language or dialect is inherently better or worse than anyone else's. But no. Two and a half thousand years later, we are still struggling with this basic concept, and in my own country, there's one way of speaking in particular that people could really stand to actually learn a little about. I mean, there are loads of different ways that people speak in the US, but there's one that people don't even usually think of as a legitimate accent or dialect, instead they just call it slang at best or broken English at worst. What I am referring to has been called many different things over the years, but the standard term among linguists and what I'll be using for the rest of the video is African-American vernacular English, or AAVE. No matter where you live in the US, whether it's the West Coast or the East Coast or Chicago or the Deep South, black people often have a way of speaking that's very different from white people. Hmm. Um, black people have a way of speaking that's very different from white people? No, you can't see the white one. Black people have a different way of speaking from white? Eh, you still can't really see him. Black people have a- that just looks weird. I'ma be honest, I have no idea how I should illustrate this. Okay, you know what? I give up. From now on, black people in AAVE are purple, while white people in general American English are pink. By the way, general American English is a dialect of English, which is very close to what I'm speaking right now. It's the one that people tend to use in professional settings in the US. Something I want to clarify is that not all black people speak AAVE. In fact, it's actually incredibly common for black people to speak both AAVE and general American English, making them, well, they're not bilingual since AAVE isn't a separate language, but is bi dialectal a word? Oh cool, it is. So yeah, not only that, but AAVE varies a fair amount from region to region and even from person to person, but at the same time, a black person from Los Angeles will very frequently sound way more similar to a black person from Chicago or New York than to a white person from LA. Why is this? Well, there are two main theories about where AAVE comes from. The older of the two theories is that AAVE diverged from early modern English just like American English and British English. Whenever different groups of people stop talking to each other, they inevitably start speaking differently. Sometimes they don't talk because they're too far away from each other, which is how the different dialects of Latin became more and more different until we wound up with French and Spanish and the rest. But it can just as easily happen for other reasons, just so long as people are talking to other people in their group way more than everyone else. And even though the slaves who were brought over from Africa would have had to learn English at first, they would have definitely been talking with each other way more than with white people, a situation which continued even after slavery ended, all the way up until... well, it still came to that way actually. Over time, this could have easily led to the divergence of general American English and AAVE. AAVE was concentrated in the southern US for most of its history, since up until the 20th century that's where almost all black people lived. But during an event called the Great Migration from around 1910 to 1970, millions of African Americans started moving to the north and they took their dialect with them. The other theory about where AAVE comes from says that it didn't just diverge from general American English over time, but that it started out very different from the English that white people spoke. When the African slaves who were brought to the US got there, they wouldn't have spoken English at first. Initially they would have spoken in Bundu, or Betty, or Yoruba, or Edo, or Housa, or Ezone, or Ful, or Igbo, or, um, wow, there are a lot of languages in this region. Anyway, the theory says that these languages mixed together with English when they got to the US, creating a sort of hybrid language that over many generations became more and more influenced by and similar to the English that white people spoke. Both theories are probably true to an extent. AAVE is mostly English, but it also clearly has at least some influence from African languages. Exactly how much influence came from which source that AAVE's birth is still an ongoing debate on linguistics. Now, I've spent the majority of the video so far talking about AAVE, but I have yet to actually talk about what it sounds like, or what makes it different from general American English. You've probably actually heard it before, but a lot of people just assume it's a series of mistakes and mispronunciations, when it's actually just as rule-based and internally consistent as general American English. Phonologically, a couple big differences are that in AAVE, the TH, TH, and TH sounds change to T, TH, D, or V, depending on the context. And also, consonant clusters that have a stop sound as their second sound are often simplified, with the stop sound being dropped. So, both of us think that we'll find the desk there would become something along the lines of both of us think that we'll find the desk there. There are other differences depending on the region, but those two are among the most widespread, and I think the most noticeable. But what people tend to notice way more than differences in pronunciation in AAVE are its differences in grammar. AAVE will often sound like it's just dropping words all the time, but it does so in a very consistent pattern. In general American English, we have a habit of contracting words, for instance, making she is the one into she's the one. But there are some circumstances where we can't contract things, like we can't make I don't think she is into I don't think she's. Well, as a general rule of thumb, wherever general American English can contract, AAVE can delete. She is the one becomes she to one, but I don't think she is can't become I don't think she. Another difference people tend to pick up on is the fact that AAVE treats double negatives differently. In general American, I don't have none means that you do have some, but in AAVE, it would mean that you don't have any. In AAVE, multiple negatives reinforce each other, while in general American, they cancel each other out. I think it's worth noting that all the things I've talked about so far in AAVE aren't unique to AAVE. Dropping linking verbs happens all the time in languages besides English. Like, this means I am hungry in Chinese, but there are only two words. It literally translates to I hungry. And the first part of the Muslim Declaration of Faith, la ilaha ila Allah, word for word translates to no God but God, but means there is no God but God. As for the double negative thing, multiple negatives reinforcing each other actually used to be the norm in English. Shakespeare and Chaucer would regularly say things like, nor never none shall mistress be of it, save I alone. Or he never yet had no villainy, nay, um. Well, it means something like he never yet had no vileness said. Unless you're willing to say that everyone who speaks Chinese or Arabic, as well as Shakespeare and Chaucer were all doing it wrong, it doesn't make any sense to say that AAVE is wrong either. But I've saved my favorite part for last. Most of what I've talked about so far has been about how AAVE simplifies things, reducing the number of possible sounds, shortening consonant clusters, dropping words. But the AAVE tense system is arguably much more complicated than that of general American English. When speakers of AAVE say things like he be working, people who don't speak AAVE often assume that this means the same thing as he is working and they're just not conjugating the verb. But he be working is actually a usage of what's called the habitual be and it actually means something along the lines of he works sometimes or he is in the habit of working or he has a job. It's a bit hard to translate actually. So he be working could actually easily be true even if the person you're talking about happens to be at home right now. It's an entire tense that just doesn't exist in other dialects of English. This is probably my favorite example of how people can be very quick to just write off others as doing it wrong. But when we actually listen to each other and take a closer look at what we're saying, we find that what looked at first like a simple error is actually just another tool people use to express themselves, one we might not even have. Linguistics doesn't often have much in the way of practical application. It can feel a little like philosophy at times, interesting but not immediately relevant to much. But the biggest practical lesson we can learn from linguistics is that everybody's speech is just as rich and complicated and logical as our own even if it doesn't look that way at first. And when some people's speech is labeled correct while others is labeled incorrect, it's usually just because the people who speak correctly also happen to be the ones making the rules. So when you hear someone say something that sounds wrong to you, before you correct them, maybe take a moment to ask yourself if instead of a mistake, it might just be a different way of getting your ideas across that you've never heard before. In my experience, the world starts to look like a much more interesting place that way. Catch you guys in my next video.


Hey everybody it's Eric Johnson from Eritrea Theros Nation and today's video we are gonna go inside multiple days of training with Yumi Ando. He came in from Japan and you're gonna notice that I'm gonna be really visually demonstrating. Yumi doesn't speak a lot of English, I don't speak Japanese. Thankfully we had a translator app but the one thing we do universally speak is the international language of throws technique. So here you're gonna see me put him into positions, work and kinda take him through multiple days of training. Turn the left foot. Yumi makes a lot of common mistakes so I think it's a pretty good example of it doesn't matter what language you speak or what not.  Everybody has the same challenge but the physics is the same for everybody. We're really learning what Yumi was gonna need to be doing over the course of the next few days. That part is pretty difficult. Yeah. Throwing chain reaction. So whatever I do in the first pillar is gonna dictate pillar 2, 3, 4, 5, 6. That was nice. Here we were on to day 2 and we were just kinda starting out. The challenge for somebody like Yumi or most throws out there is when you're in a pattern even though you can with your head understand that you need to be changing the pattern you might understand what I'm coaching you to do. It just takes time to get your body to do it. And that's what we were kinda teaching here.  Yes. That was better. Yes. You feel that? Good. Ah, ah. So one of the things you're gonna notice with Yumi is that one of the things we call is our pillar 1, 2, right? And that's setting up our chain reaction and setting up maximum power.  So now pillar 3, applying speed, his transition and his power position are all compromised as a result. So one of the things we were trying to do is get him out of that habit.  And you of course want some but one of the things he was doing is it was too much and it was cutting him off. So he has multiple stopping points in the throw.  You need to be accelerating from start to finish and that's why he kinda drifts. So he's got a lot of good core things that he's trying to do but his positions aren't allowing him to optimize his throw. Okay, so here we are on to day 3. You see his first throw, we took it with a heavy bar. So now we're gonna add some different things and we've talked a lot about that and you can see here I kinda demo a step through and so by kinda moving back and forth between heavy bars and the discus we're gonna kinda be able to feel the throw a little different and that's what we wanna do to help him more rapidly make changes in his throw. Kinda here still demoing what he's doing wrong and what I want him to do.  Do you see the difference? You are going outside. You can just see how much time we're putting into working an isolated position in Pillar. We're just trying to get him to understand how critical that movement is and that's what's gonna be really important for him. So you can see it's starting to slowly get better but this is a long term habit that's gonna take several weeks or if not months to change. Wow. Yeah, so you do this.  You do this. You push here. So now you can see flash forward to in the last month you mean I've been coaching virtually and so it's kinda just building on the things that he was doing when he was here and so it's really visual so that he can apply the information. Closer, yes. Okay. That was good. So here you can see again I'm in the studio we're just showing him this is the same problem he's got this habit and that's what's tough for throwers when you have these ingrained habits changing that pattern can be a very time-consuming thing but once it clicks it'll click. Okay, I found that I'm finding all the problems. This is the same things that we were working on when he came out. He understands but again this is what a lot of throwers have to be patient about we always talk about it's the timeline every thrower has a different timeline some people are gonna pick things up quicker but this is where again some of those weight training issues really play a role in what the athlete's doing so a lot of Umi's movement plays into his strength so he's got good strength but we need some more specific strength we have something in our system that's called a wind-up one and that's gonna be designed to eliminate a lot of extra motion so that we can just really isolate that pillar one to position shorten it up and make it easier for him to feel and create a new pattern taking it back virtual coaching we're not gonna let COVID slow us down you can get so much work done so many different ways and the more ingrained a pattern is the more challenging it is going to be to change it so just be patient give it time because the way throwing works is once that habit changes everything clicks in and you'll take a big jump and that's what's gonna be happening soon for Umi hopefully you enjoyed today's video give you a little insight into some throwing and kind of the process thanks so much and we'll see you on the next video hopefully you guys enjoyed today's video as you can see there's a lot that goes into what we do with the throwing chain reaction system if you would like to learn more about how to structure your practices and find the things that help unlock your potential click the link below and we will see you on the next video


Keep on searching Everything's ready for our house warming. I'm so excited All I need to do is slap on some time and do my hair and I'll be Chloe I know we're gonna have a really good time because I'm feeling my absolute best Now everyone's here it's time to show off our gorgeous new home How's Marley getting on with his own room?  So just wait. Yeah, I really like you and Jordan Amazing John is in my room. Yeah, you're in love my room. Wait wait wait for it. It's always tidy I love how simple it is. Yeah, I know it's so cute If I had a house, this is how simple it would be. It's just laid out exactly how I want it I've got my two lampchains. I've got two sideburns before it's like a cop. I just like love having my own space Yeah, she grew up a bit. Yeah, it does Marley made me grow up, and then this has made me even more.  No I was like a ring, but I don't want to marry him yet. I won't want to marry till I'm like 50 What? Because I want to have all my kids and then I can be dead skinned. Oh, what five? If I had a boy next I won't be able to stop like I need to go If I ever go next I might stop, but if I don't we're gonna be carrying on. I could be like 13 lads and then I'm like still going for a girl Yeah, I would It's amazing having everyone here tonight It makes me so proud of what me Jordan and Marley have achieved We just want to thank everyone for coming obviously like We kind of wanted to show you all our house and how hard we've worked Obviously we're still only 19 and we kind of just worked our butts off and got what we can for us and Marley Which is perfect.


Hello, this is LaptopMedia, and today, we will show you how to open the Lenovo ThinkPad X13 Gen 3 and what's inside of it. To access this notebook's internals, you need to undo 7 captive Philips head screws. Then, pry the bottom panel with a plastic tool, starting from the back. Please remember, it would be of great help to us if you just hit the like button and subscribe to our channel. That would motivate us to make even more and better videos for you. We got a 54.7Wh battery pack. It lasts for more than 10 hours of web browsing, or 7 hours and 30 minutes of video playback. To take it out, unplug the connector from the motherboard, and undo all 4 Philips head screws that keep the battery attached to the chassis. Here, the memory comes soldered to the motherboard. You can pick between 8, 16, and 32GB of LPDDR5 RAM, working at 4800 MHz. Storage wise, there is 1 M.2 PCIe X4 slot, which fits Gen 4 SSDs. In terms of cooling, there is 1 heat pipe, a side mounted heat sink, and a fan that blows the heat away from the chassis. If you'd like to see more disassembly videos of the latest notebooks we would highly appreciate if you hit the like button and subscribe to the channel.


So I'm on the stand here at MSP and these guys have brought out their developments from Cape Town So up to Joerg and wanting to really Feature the different lifestyle products that they've got so we're gonna have a little chat with Karina and find out a little bit More about what they do Seven Wacht is actually the nicest place or the closest to heaven I would say really we've stayed there while my husband was busy with the building of Seven Wacht and It's just a different life and the moment you go through those gates. It's like it's a bird's life. There's two dams Peace and tranquility the moment you drive into that into the estate and there's two different sections I would say the one part is more for the younger heart that's 50 years and older and There's different options to choose from six different floor plans that you can choose from and the range from 154 square meters up to 262 square meters private property a home for everyone