#the pattern matcher matches patterns
Explore tagged Tumblr posts
Text
Behold, the torment nexus, from award winning book, "Don't make the torment nexus"
#distopia#ai ethics#ai#crime#predictive ai#policing#acab1312#so this is just racial profiling right#the pattern matcher matches patterns#as my cs prof always said#garbage in garbage out
2 notes
·
View notes
Text
Faith and Fate: Transformers as fuzzy pattern matchers – Answer.AI
0 notes
Text
Insights of AI Computers
All these large language models, which we referred to as artificial intelligence (AI), are merely patterns matchers. A sophisticated process with many levels of calculations using minute matching to pieces of patterns. Weights of probability are assigned to each piece of matching. Then, all the weights and probabilities are added up and when it reaches a certain threshold, then it is matched to a specific pattern.
After billions of calculations, it still can not reason. Has no logic. Has no perspective. Does not "know" what it has matched to, just like one typed letter next to another typed letter on a page. No knowledge to the letter, space, or word next to itself. A dumb, but complicated machine and nothing to be alarmed about!
What the AI is good for is matching one pattern to another. Under human directions and guidance, we can use this powerful tool to match unrelated patterns to other patterns, similar to a human having insights. AI will thus be discovering more insights for human growth and prosperity! The AI has no ability and no understanding to create these insights on its own! These insights are caused by human involvement and interactions with the AI process! From these AI processes, our civilization will develop and prosper!
However, if science, from 3D mapping of the fruit fly's brain, can create by using the six parts that I have sketched out in previous entries, then we will be facing a far greater challenge from these artificial human-like intelligent entities! How many years are we away from this? 5 years? 10 years? Eventually, it will happen!
#consciousness#atheist#mind#meditation#buddhism#spiritual#buddha#atheism#buddhist#hinduism#insights#mysticism#mystical#gnosticism#gnosis#gnostic#wisdom#reality#thinking#reasoning#logic#truths#perception#understanding#emotions#desires#addiction#recovery#substance abuse#addiction recovery
1 note
·
View note
Text
Regular Expressions Basics
Regular expressions can be used in Java via the Pattern and Matcher classes to validate input formats or parse part of a string out of a larger string. #java #regExp #regularExpressions #pattern #matcher #syntax
Table of Contents Table of ContentsIntroductionUse CasesPredefined Character ClassesCustom Character ClassesGreedy CountsAdditional KeywordsLogical OperatorsInvokingCapturing GroupsHelpful FlagsExamplesSummary Introduction When consuming String inputs, we may need to search within that string to see if part or all of it matches a pattern in order to determine that it is valid, or to extract or…
View On WordPress
1 note
·
View note
Text
another drabble from this ask.
warning; choking (can u tell i have a choking kink), cursing, jin’s kinda a dick, a lik self indulgent
——————————
Bighit Entertainment Office Elevator
——
Dying doesn’t sound so bad.
You’d decidedly chose the color blue for your funeral attire while rocking back and forth on the heel and toes of your feet.
Of all people, why him?
Beside you, your mortal enemy clicked and jammed elevator buttons frantically, muttering under his breath. His hair was disheveled and his blazer was open, giving you a perfect view of the tight button-up shirt that was pulled taught over his toned chest and broad shoulders. Those stupid shoulders.
Seokjin was six foot two and a hundred and ninety pounds of pure aggravation. With his nice lips, pretty smile and sharp tongue, he had just about everyone in the office wrapped around his finger. Everyone but you.
You actually despised Kim Seokjin.You hated how he puffed his chest and lashed his tongue, lips wrapping around words of arrogance and narcissism. It didn’t help that he was annoyingly attractive and sickeningly charming.
The clicking and jamming continued in an incessant pattern of annoyance, causing you to grind your teeth together to refrain from losing your temper. But that would prove to only take you so far.
“Ay, would you quit it?” You huffed, blowing the loose curl out of your eye.
He shot you a glare, before pushing his lose, un-gelled strands away from his forehead and letting out a huff of frustration.
“How the hell could this happen!? And right before my album meeting! God this all your fault!” He pointed a long, accusing finger at your exposed chest.
An angry heat rushed through your body, instantaneously causing small beads of sweat to prickle up on your neck.
You didn’t respond, instead pulling your blazer off of your shoulders and dropping it to the ground.
“Call Suga. Tell him to send maintenance. I can’t be stuck in here with you for much longer.”
—————————————
Two Hours Later
You both hadn’t moved from you respective corners, having since come to terms with your predicament.
The silence was deafening in Jin’s ears, driving him slowly to insanity, so he said the first thing that came to mind.
“I don’t hate you, y’know.” His voice was soft, causing you to eye him suspiciously, eyebrows shooting up in the direction of your hairline.
“The thing is, I’ve never had someone shut me down the way you did when we first met. You were so confident, so bold. Everything I want. But you didn’t want me. It was a new feeling. So I figured, if you didn’t love me, than you should hate me.” He turned his head toward you, licking his lips at the sight of your glistening skin and messy hair. He loved this natural look on you.
“Well since we’re airing shit out, I don’t hate you either. I’m just a matcher of energies.” You simply shrugged nonchalantly.
Jin looked you over. My you were beautiful. A sight for sore eyes if he’d seen one. Not to mention a breath of fresh air after dealing with women who threw themselves at his feet for hours on end. His only interactions with you had been negative but he admired you from a far, watching as you’d grip Namjoon’s bicep as you laughed at something he’d said. Or shoot glares at Taehyung when he’d bring up embarrassing stories from drunken nights on the town. He was so intrigued by you, determined, even now to pursue you and gain your attention.
And before he knew what he was doing he was sliding over toward you, wrapping your neck in slender fingers and brushing his lips over yours when he was close enough before saying:
“Match this energy then.”
———————————
20 notes
·
View notes
Text
Advent of Code
As a child, advent calendars always added to the sense of anticipation in the lead up to Christmas. In my day you would be lucky to get a small picture behind each of the doors. These days, children expect chocolates or sweets. My wife has once even had a "Ginvent Calendar", with gin behind each door.
This year I marked Advent by having a go at the "Advent of Code" which has Christmas-themed programming puzzles posted each day. Most days are in two parts, with an easier puzzle followed by a harder one. Traditionally, I've posted a (mostly ignored) programming puzzle to our development team each Christmas. Last year I just recycled one of the Advent of Code puzzles, but this year I suggested we attempt the whole thing. The puzzles are so well thought out, in comparison to my efforts, that it seemed pointless to compete.
In the end, several of the team had a go. Some of the puzzles were harder than others, but I managed to solve them all by Boxing Day. What follows are some personal anecdotes from the various days with some general thoughts at the end. Note that there are some spoilers and the notes won't mean much if you've not done the puzzles. So in this case just skip to the end.
a sum-finder. I implemented the search tree via recursive calls. I drifted into using Python right from the start. It just felt like the easiest way to hack the puzzles quickly. In the past I had thought about using the puzzles to learn a new language. A colleague had done that with Rust in a previous year. Despite these good intentions, expediency took a firm hold. That said, in several puzzles I would have liked immutable collections or at least Lisp-style lists.
a pattern counter. Not that interesting except patterns were emerging in the programs themselves. Regular expressions got used a lot to read in the puzzle data. I learnt about things like match.group(1,2,3) which returns a tuple of the first three match groups, so you don't have to write (m.group(1), m.group(2), m.group(3)).
a grid tracer. The first interesting one because it was unfamiliar. Some other patterns started emerging: problem parameters got promoted to command line arguments, and data structure printers got hacked to help debugging. These two were often added between part 1 and part 2 of each problem.
a data validator. This felt like a bit of a slog. It was mostly about capturing the validation rules as code. Even though I made a point of reminding myself at the start that re.search doesn't match the whole string I still forgot it later. Duh.
an indexing problem. I patted myself on the back for realizing that the index was a binary number (or pair of binary numbers as I did it). At this point the solutions were still neat and I would do a little code golfing after the solution to tidy them up a bit and make them more concise.
another pattern counter. Pre-calculating some things during data reading kept the later code simple.
a recursive calculator. This was one of those puzzles where I had to reread the description several times to try and understand what it was asking for. It entailed a slightly tricky recursive sum and product, which was again made easier by creating more supporting data structures while reading the input data.
an interpreter. Probably my favourite individual puzzle because it was so sweet, especially after a bit of refactoring to make the language more data-driven.
another sum-finder. I found I didn't particularly like these.
an order-finder. This was the first one that made me pause for thought. An overly naive search algorithm from part 1 hit a computational complexity wall in part 2. I beat the problem by realizing that the search only had to be done on small islands of the data, but a colleague pointed out there was a better linear solution. The code was starting to get a bit ragged, with commented out debugging statements.
the game of life. The classic simulation but with some out-of-bounds spaces and some line-of-sight rules. It helped to print the board.
a map navigator. I liked this one even though I forgot to convert degrees to radians and that rotation matrices go anti-clockwise. I even introduced an abstract data type (ADT) to see if it would simplify the code (I'm not sure it ever did - I mostly used lists, tuples, strings, and numbers). The second parts of the puzzles were starting to get their own files now (usually bootstrapped by copying and pasting the first part's file).
a prime number theorem. I actually got stalled on this one for a bit. It eventually turned out I had a bug in the code and was missing a modulus. In effect I wasn't accounting for small primes far to the right. I left the puzzle and went on to complete a couple of others before coming back to this one. I checked what I was doing by Googling for hints, but in the end I had to take a long hard look at the data and find my own bug.
some bit twiddling. Part 1 felt like I found the expected bitwise operations, but part 2 felt like I was bashing square pegs into round holes.
a number sequence problem. Another pat on the back, this time for keeping a dictionary of recent occurrences and not searching back down the list of numbers each time. Another recurring pattern is evident: running a sequence of steps over the data. I liked to code the step as its own function.
a constraint solver. A nice one about labelling fields that satisfy the known constraints. Half the code was parsing the textual rules into data.
another game of life simulation. This time it was in more dimensions. I generalized from 3 dimensions to N instead of just doing 4. This made it more of a drag. I started naming auxiliary functions with placeholder names (social services should have been called). Also, I tacked on extra space along each dimension to make room at each step. This felt very ugly. I should have used a sparser representation like I did for day 24.
an expression evaluator. I used another actual ADT and wrote a simple but horrible tokenizer. The evaluator was okay but I hacked the precedence by inserting parentheses into the token stream. Don't try this at home kids.
another pattern matcher. Probably my biggest hack. My code compiled the pattern rules into a single regular expression. This was cute but meant the recursive rules in part 2 needed special treatment. One rule just compiled into a repeated pattern with +. Unfortunately, the other rule entailed matching balanced sub-patterns, which every schoolchild knows regular languages can't do. Perhaps some recursive pattern extensions might have worked, but I assumed there would be no more than 10 elements of the sub-patterns and compiled the rule into a large alternative of the possible symmetrical matchers. Yuck.
a map assembler. I did this one the most methodically. It had proper comments and unit tests. Overall it took the most code but perhaps it was just dealing with all the edge cases (ba dum tss). But seriously, it seemed to take a lot of code for rotating and flipping the tiles even after knowing how they must be connected. So probably there was a better approach. It was still satisfying the see the answer come out after all that work. Curiously, this one involved little debugging. I wonder if perhaps there is some connection between preparation and outcome?
a constraint solver. I tried a dumb approach first based on searching all the possible bindings. That didn't look like it was terminating any time soon. So I reverted to a previously successful technique of intersecting the associations and then then refining them based on the already unique ones.
a recursive card game. This card game playing puzzle seemed to be going okay, but the real data didn't converge for part 2. Had a quick Google for a hint after battling with it for a while, and the first hit was from someone who said they'd misread the question. Sure enough I had too. My recursive games were on the whole deck instead of the part dictated by the cards played. Duh. The description was clear enough and included a whole worked game. I just hadn't read it properly. It still seemed to need some game state memoization to run tolerably fast.
a circular sequence. Took three attempts. A brute force approach using an array was good enough for part 1, but no way was it going to work on part 2. Even optimizing it to use ranges was still 'non-terminating' for the array-based solution. So I Googled for a little inspiration and found the phrase "linked lists" and slapped my forehead hard. I switched to a dictionary of labels to labels and the solution popped out very easily, without any further optimization. Embarrassing. Was it time to ceremonially hand in my Lisp symbol and fall on a sharpened parenthesis?
another game of life. This one sounded neat because it was about a hex grid, but I didn't know how hex grids are usually indexed. So for the first time I did a little bit of general research at the start. Turns out there are a bunch of ways to index a hex grid. I opted for using 3-axes as that seemed natural despite the redundancy. The map itself was just a dictionary of locations. I should have looked up how to have structured dictionary keys in Python (implement __hash__) but I couldn't be bothered so I (look away now) serialized and deserialized the locations to and from strings. I still had a bug which I couldn't find until I hacked a crude hex board printer and realized I wasn't carrying the unchanged cells over from one iteration to the next.
a cryptographic puzzle. Came out quite short but only after some faffing around. Main trick seemed to be to keep the transformation ticking along instead of recalculating it from scratch each time. There was slight disappointment (tinged with relief) that there was no part 2.
Some general lessons I felt I (re)learned:
Read the questions very carefully, then reread them.
Try and use terms from the questions. Don't invent your own terminology and then have to map back and forth.
Make the trace output exactly like the examples to help comparison.
Next time I'd consider using BDD to turn their examples directly into tests. Next time.
Try the problem for a while by yourself, then think about it offline, and only then Google for hints.
Next time I'd consider using some form of source control from the start, or just a better set of file naming conventions.
Regular expressions go a long way, but can then they can get in the way.
Next time I'll consider doing it using a language I'm learning.
Sometimes when you get stuck you have to start again.
During some low moments it all felt like make-work that I'd inflicted on myself, but in the end it was a nice set of training exercises. I'd encourage others to have a go at their leisure.
"Practice is the best of all instructors." -- Publilius Syrus
2 notes
·
View notes
Text
Broken Things Shine Brighter 18
Here’s the next chapter of BTSB. The name thing was getting too hard, so I fixed it! Enjoy!
Link: http://archiveofourown.org/works/13431909/chapters/56179339
Blue didn’t know which felt weirder; the emotions rushing through him that weren’t his own, or the rubbing of the bandages on his newly injured chest. Neither hurt exactly, but Blue knew that was because of the pain medicine he was now on. Apparently enough time had passed for the monsters in Dr. Undyne’s care to mass produce the first aid supplies that had been so lacking when he first arrived.
And hadn’t that been a surprise to the rest of the Underground. Not only had most of those monsters survived, but they had formed a tight-knit community that actually cared about one another. They even cared about the rest of the Underground, and they were slowly teaching them how to love again.
Blue was doing that job, too. He’d been doing that before the Day of Freedom, but now it was much more organized. It had been a few days since then, and he was still working on Sans. The other had some… odd ideas about how this whole soulmate thing was supposed to work.
At first Blue had thought that these were just the standards of his world, but Muffet had set him straight. “I don’t know what he’s thinking,” she had said when Blue had asked her why Sans kept refusing his contact. “Soulmates are supposed to touch and care for one another, even outside the home.”
That had opened Blue up to the realization that Sans was uncomfortable. He’d tried to speak to him about it, but he hadn’t even been able to get past his name before Sans had winced. That had spun around inside of Blue’s head for hours, and he finally had his conclusion.
Blue sat up in his little cot, which Papyrus had helped him move into Sans’ room. He took in the room itself. It reminded him of his brother’s, but it also reminded him of his own. The walls were bare and the floor was strewn with socks, but there was a table with action figures, a computer, and a racecar bed. The bookcase that had been in his brother’s room was replaced with the chest of drawers from his. All in all, it looked lived in and loved.
Sans was currently laying in his bed, staring up at the ceiling instead of sleeping despite the late hour. Blue crawled out of bed and over to his side, carefully not touching him. Sans shifted so he was looking down at him. Blue couldn’t read his expression, but he could feel his curiosity.
“YES? WHAT IS IT?” Sans asked as quietly as he could.
“i think i’ve realized something that could help you. you don’t like your name, do you? you’ve been flinching every time i say it ever since we were bonded.”
Sans froze, his soul radiating startlement and confusion. Blue could see and feel the wheels turning in his head. Then he felt the realization hit Sans. It felt like the truth. “I… I BELIEVE YOU’RE RIGHT. HOW STRANGE. I’VE NEVER HAD PROBLEMS WITH IT BEFORE. WHY WOULD IT HURT ME NOW?”
Blue shrugged. “my guess is that all the times that she said it when she was hurting you have finally added up. and maybe there’s a little bit of… i don’t even know what to call it… but some kind of emotion about the fact that it’s my name, too.”
His soulmate considered this. Then he nodded. “I SUPPOSE THAT MAKES SENSE. AFTER EVERYTHING SHE DID EVEN THE MAGNIFICENT… ME… IS BOUND TO HAVE SOME… WHAT DO THE HUMANS CALL IT? AH, YES. TRIGGERS. HER DAMNED CONTRACT SUPPRESSED THEM UNTIL NOW. IT IS UNFORTUNATE THAT ONE OF THEM HAS TURNED OUT TO BE MY OWN NAME.”
“yeah, but at least it’s an easy one to fix. all we need to do is find you a nickname, like mine. do you have any ideas?” Blue asked.
“HMM,” Sans considered this, “I DO NOT. MAYBE ANOTHER COLOUR? I’LL ADMIT I WOULD LIKE TO MATCH WITH YOU IN SOME WAY, AND THAT SEEMS THE EASIEST WAY TO DO SO. MAYBE SOMETHING BASED ON MY MAGIC?”
Blue hummed and pulled out his phone. “let me look up some better names than just reddish purple. you’re a magnificent monster. you deserve a magnificent name.”
Sans smiled at him, that giddy little smile that Blue was coming to love. It always accompanied a happy little surge… and a bit of humbleness, which was odd when you realized that the easiest way to make it happen was to compliment him. Blue wondered if his brother had felt the same way. Probably. He knew that both Sans and Blue’s Papyrus shared one thing; they were both autistic. There were a hundred little things that told him so, from their obsession with their favorite outfit to their speech patterns. Some people might read them as arrogant, but he knew better. They just were uncomfortable with their words and tried to hide that by being over the top confident. He didn’t think there was anything wrong with that. In fact, he thought it was cute.
Speaking of cute, Blue landed on the perfect site to supply him with names. It was a colour matcher from a paint salesman. He held it up triumphantly. “here! this site matches up your magic colour with the names of different paints in the same family. this will be perfect! summon something. uh, please?”
Sans laughed. His laugh was some weird mix of a giggle and a chuckle. It was cute and perfectly him. He summoned a little bone. It burned with raw magic, the kind that was inefficient on purpose to make the room warmer. “WILL THIS SUFFICE?”
Blue nodded and held up his phone, snapping a picture of Sans’ magic. The little wheel of doom spun, then a palette of colors popped up in front of him. He tried them out. “um… how about wine?”
Sans shook his head. “TOO FORMAL. BESIDES, DOCTOR WINE SOUNDS ABOUT AS FAKE AS YOU CAN GET.”
Blue moved on to the next one. “okay then. garnet, maybe?”
“NO,” Sans decided after a moment, “THAT FEELS A LITTLE TOO FEMININE FOR ME. WHAT’S NEXT?”
“raspberry?” Blue said hopefully.
Sans hesitated. He seemed to like it, but… “THAT IS TOO LONG. I’M USED TO JUST ONE SYLLABLE. WHAT IF WE SHORTENED IT TO RAZZ?”
Blue’s face lit up. “that sounds perfect! it’s got a nice ring to it and it matches your magic colour. plus, it’s such a luxury item. raspberries were super rare back home, and they were always expensive. that’s perfect for someone as majestic as you!”
“THE MAGNIFICENT RAZZ,” his soulmate said, “I LIKE IT… THANK YOU, BLUE. YOU SOLVED A PROBLEM I DIDN’T EVEN KNOW I HAD BEFORE IT GOT TOO BIG TO DEAL WITH. FOR THAT, I AM GRATEFUL.”
Blue beamed at him. He knew he could do it. “of course, razz. now, let’s get some actual sleep before we tell everyone in the morning.”
=====
Razz couldn’t be nervous. He was a magnificent skeleton, truly smart, brave, and loyal. So there was no way that he was nervous about this. He was only going to talk to his brother! That wasn’t scary at all! RIght?
Blue sensed his internal conflict and stopped moving. Razz bumped into the back of him. He glared at Blue when the other turned to face him, but his heart wasn’t in it. He just wanted to see Blue’s cheeky smile again. He loved it. It made Blue’s whole face light up with hidden laughter. If there was any expression that Razz wanted to see on his face, it was that smile.
“heh. someone’s eager to get this going. what do you think your brother’s going to say?”
Razz straightened. “WELL, OBVIOUSLY HE IS GOING TO BE IMPRESSED WITH THE PERFECTION OF MY NEW NAME! IT IS TRULY MAGNIFICENT AND WORTHY OF SUCH A GREAT MONSTER AS MYSELF!”
The next voice that spoke wasn’t one he expected. “what kind of perfection? physical? auditory? emotional?”
Razz spun around. Coming down the stairs behind him with a very familiar grin on his skull was his brother, Papyrus. He looked unnaturally tense for someone who was usually so relaxed. Seeing his brother like that made Razz’s own defences rise. He swallowed his nerves and said, “HAVEN’T I TOLD YOU NOT TO SNEAK UP ON ME LIKE THAT?”
Papyrus smiled cheekily at him. Razz couldn’t help but compare it to Blue’s smile. They were similar, yet oh so different. Blue’s smile had a softer edge to it, and his eyes looked so mischievous, like a little kid pulling a prank on an adult. Papyrus’ smile was harder, sharper, and much more cynical. It was more how Razz pictured a real imp or a demon would look when contemplating doing… something. Exactly what that was, Razz had never really understood.
That smile surrounded Razz on both sides. He ignored it, waiting for his brother’s response. “you never told me not to sneak up on you on the way down the stairs, sa-”
“don’t say it! please!” Blue almost screamed. Papyrus stared at him like he was crazy.
Razz quickly jumped to his soulmate’s defense. “HE’S RIGHT. MY NAME HAS… UNFORTUNATE EFFECTS ON ME, NOW. IT SEEMS TO HAVE BECOME A TRIGGER. BLUE NOTICED, AND HE CAME UP WITH THE IDEA OF GOING BY A DIFFERENT NAME. I’VE SETTLED ON RAZZ, AS IN RASPBERRY. WHAT DO YOU THINK?”
The second smallest skeleton in the Underground wasn’t even aware how scared he was until Papyrus shrugged. Then a trainload of relief got dumped on his head. “sounds cool to me, bro. the name’s about razz good razz it gets.”
Razz glared at his brother. Really, puns? at a time like this?
Papyrus chuckled. “heh, yeah. no, but seriously, i don’t see a problem with it, s- razz. i know it’ll take a while to get everyone on board… say. how would you feel if i changed my name, too? then you could say you changed your name when i did and not have to tell people why. i don’t want anyone to deliberately try and trigger you because they’re an asshole.”
Surprise, respect, and pleasure came flooding down the bond Razz shared with Blue. He could feel it matched in his own face. “THANK YOU, BROTHER. THAT… WOULD BE APPRECIATED. WHAT DO YOU PLAN ON CALLING YOURSELF?”
Blue cleared his throat. “you could call yourself breaks. you know, like-”
He stopped when Papyrus burst into laughter. He doubled over with his arms wrapped around his lanky torso. Eventually he ended up sitting on the stairs. When he caught his breath, he said, “like what i wanted to name you? thanks, but no. i think i’ll go for my old nickname. muffler used to call me slim, cause i got so tall way faster than i got wide. hell, i’m still a beansprout. i already answer to it, so why not go with that?”
“It’s true,” Razz spun again to see Muffet, who was standing in the front door. “He’s always been the tall and thin type. Razz and Slim both have nice rings to them. I’ll send out a message so as few people have to be directly told as possible.”
Another boatload of relief filled Razz’s soul. He had not been looking forward to facing this same conversation hundreds of times over. It felt nice to know he wouldn’t have to. “THANK YOU, MUFFET. THAT MEANS A LOT.”
Her face softened. “You’re welcome, Razz. Now, I need to steal your new soulmate. You can come if you want, too. We’re going to dismantle those awful dresses of the Queen’s and make something new out of them. Maybe a wall quilt? Anything is better than rotting away and never being worn.”
=====
This time Slim was much closer when his phone’s alarm went off. He was actually sitting at his sentry station. The alarm was connected to the cameras he had placed along the path into Snowdin, so that meant something had triggered them. He pulled up the app he had built and stared at the image it had captured. A thrill shot through him as he realized what it was. It was a human.
Slim jumped up and ran towards the Ruins door. He didn’t get far. The human had made it further this time. She was shorter than the last one, with paler skin and golden hair. She was wearing a very pretty blue dress that was stained with mud. It looked like something a princess might wear., with ruffles, puffy sleeves, and a long train. The bottom was ripped enough that Slim could see her shoes - or, rather, her lack thereof. Muddy feet with a few bleeding cuts peeked out. When she saw him she stopped and waved. “Hello, monster! My name is Patience. What is yours?”
Slim stopped moving, a little bit shocked at the friendliness. “i’m, uh, papy- no. i’m slim now. slim.”
Patience tilted her head curiously. “Did you just change your name, Slim?”
Slim nodded slowly. He might as well tell her. It was good practice for talking with everyone else. “i did. my brother… had some really bad things happen to him, and his name turned out to be a trigger for the bad memories, so he changed his name to razz. i decided to change my name to make him feel like he wasn’t alone. that was this morning.”
The human smiled at him. “It’ll get better, I promise. I used to have a different name that hurt to hear, but the nice monster behind the door said I could change it. Now my name is Patience! He helped me get used to it, and now I am!”
Slim gulped. So she did know the monster behind the door. “if… if you were happy living with him, why’d you come out here? you’re… not going to last for very long.”
“I know,” Patience said with a smile. Seriously. A smile. What was with this kid? “That’s why I’m here. I didn’t know about you monsters, but the man behind the door told me how long you’ve been down here. You’ve been waiting patiently for so long to be free, and… I have no one waiting for me up there. I might as well help you achieve your goal, right?”
Slim summoned his weapon, sadness in his heart. Patience seemed like a cool kid. He wished he could get to know them more, but… he didn’t want to make Razz wait. “well… i guess i just have to say thanks, then, patience.”
Patience knelt down on the snowy ground with her hands in her lap. “You’re welcome, Slim. I hope you and your brother really get to enjoy seeing the stars.”
#rottenjoke#sanscest#swapfell sans#swapfell papyrus#sans#muffet#swapfell#broken things shine brighter#yastaghr
6 notes
·
View notes
Link
There are times when we do not know the exact item but we know how it looks like i.e. it has specific pattern and certain characteristics. So by just knowing the pattern, we can identify the items. In the same way, there are patterns to identify strings or set of strings in given text or file in java. For that, we have a REGULAR EXPRESSION in java. e.g. if we want to catch all email from the given text, we know how emails look like so we can define a pattern. We create a regex to represent that pattern. And performing pattern match on the given text, we can list all the emails in the given input text.
So regular expression is a special sequence of character that helps to match, find, edit other string or set of strings in the given input, using a specialized string held in so-called Pattern. The regular expression in java is provided through java.util.regex package. Java.util.regex primarily contains three classes name listed below
- Pattern Class: It is used to define the patterns for matching. An object of Pattern class represents a compiled representation of the regular expression. There is no public constructor available to create an object of Pattern class. To instantiate an object of Pattern class, one has to use any version of public static compile() method of Pattern class. These methods accept regular expression string as the first argument.
- Matcher Class: Matcher class is an engine to interpret the pattern of regular expression and performs the match on the input string. Matcher class too does not have any public constructor. To obtain an object of Matcher class, one has to use call matcher() method on Pattern Class object.
- PatternSyntaxException Class: A PatternSyntaxException class represents an unchecked exception that indicates a Syntax error in the regular expression.
CAPTURING GROUP in Regular Expression
The capturing group represents the group of the letter put together as a single unit. They are created by putting letters to be grouped in parentheses. e.g. (techie360).
Capturing groups are numbered by counting the opening parentheses from left to right. e.g ((t)(pq)) has capturing group in the order ((t)(pq)), (t), (pq).
To find the number of capturing group in the regular expression, just use groupCount() method on Matcher class object. Every capturing group contains group 0 which is not included in the count returned by groupCount().
Example of Capturing Group usage
import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegexMatches { public static void main( String args[] ) { // input String String line = "you are reading post on techie360!"; String pattern = "(.*)(\\d+)(.*)"; // Create a Pattern object Pattern p = Pattern.compile(pattern); // Now create matcher object. Matcher m = p.matcher(line); if (m.find( )) { System.out.println("Found value: " + m.group(0) ); System.out.println("Found value: " + m.group(1) ); System.out.println("Found value: " + m.group(2) ); }else { System.out.println("NO MATCH"); } } }
The output of the above program would be
Found value: you are reading post on techie360! Found value: you are reading post on techie360! Found value: 0
REGULAR EXPRESSION SYNTAX AND MEANING
In the below table, a complete list of regular expression letters are listed
Regex Meaning ^ Matches the beginning of the line. $ Matches the end of the line. . Matches any single character except a newline. Using m option allows it to match the newline as well. [...] Matches any single character in brackets. [^...] Matches any single character not in brackets. \A Beginning of the entire string. \z End of the entire string. \Z End of the entire string except for allowable final line terminator. re* Matches 0 or more occurrences of the preceding expression. re+ Matches 1 or more of the previous thing. re? Matches 0 or 1 occurrence of the preceding expression. re{ n} Matches exactly n number of occurrences of the preceding expression. re{ n,} Matches n or more occurrences of the preceding expression. re{ n, m} Matches at least n and at most m occurrences of the preceding expression. a| b Matches either a or b. (re) Groups regular expressions and remembers the matched text. (?: re) Groups regular expressions without remembering the matched text. (?> re) Matches the independent pattern without backtracking. \w Matches the word characters. \W Matches the nonword characters. \s Matches the whitespace. Equivalent to [\t\n\r\f]. \S Matches the non-whitespace. \d Matches the digits. Equivalent to [0-9]. \D Matches the non-digits. \A Matches the beginning of the string. \Z Matches the end of the string. If a newline exists, it matches just before newline. \z Matches the end of the string. \G Matches the point where the last match finished. \n Back-reference to capture group number "n". \b Matches the word boundaries when outside the brackets. Matches the backspace (0x08) when inside the brackets. \B Matches the nonword boundaries. \n, \t, etc. Matches newlines, carriage returns, tabs, etc. \Q Escape (quote) all characters up to \E. \E Ends quoting begun with \Q.
METHODS OF MATCHER CLASS
Matcher class methods can be divided into three categories basis the function they perform:
- Index Methods: index methods provide the index of match found in the input string. Below is the list of index methods:
Method Explanation public int start() Returns the start index of the previous match. public int start(int group) Returns the start index of the subsequence captured by the given group during the previous match operation. public int end() Returns the offset after the last character matched. public int end(int group) Returns the offset after the last character of the subsequence captured by the given group during the previous match operation.
- Study Methods: these methods perform match on the input string and return whether the match is found or not. Please see below list for all Study methods:
Method Description Public boolean lookingAt() Attempts to match the input sequence, starting at the beginning of the region, against the pattern. public boolean find() Attempts to find the next subsequence of the input sequence that matches the pattern. public boolean find(int start) Resets this matcher and then attempts to find the next subsequence of the input sequence that matches the pattern, starting at the specified index. public boolean matches() Attempts to match the entire region against the pattern.
REPLACEMENT METHODS:
These methods perform replacement in the input string. Below are replacement methods
Method & Description public Matcher appendReplacement(StringBuffer sb, String replacement) Implements a non-terminal append-and-replace step. public StringBuffer appendTail(StringBuffer sb) Implements a terminal append-and-replace step. public String replaceAll(String replacement) Replaces every subsequence of the input sequence that matches the pattern with the given replacement string. public String replaceFirst(String replacement) Replaces the first subsequence of the input sequence that matches the pattern with the given replacement string. public static String quoteReplacement(String s) Returns a literal replacement String for the specified String. This method produces a String that will work as a literal replacement s in the appendReplacement method of the Matcher class.
matches() and lookingAt() methods: Similarity and differences
- both methods match pattern in the input string
- both start matching at the start of input string
- matches() requires complete string to be matched but lookingAt() does not require the complete string to be matching.
To demonstrate the difference see the example below:
import java.util.regex.Pattern; import java.util.regex.Matcher; public class RegexMatches { private static final String REGEX = "too"; private static final String INPUT = "tooo"; private static Pattern pattern; private static Matcher matcher; public static void main( String args[] ) { pattern = Pattern.compile(REGEX); matcher = pattern.matcher(INPUT); System.out.println("REGEX is: "+REGEX); System.out.println("INPUT is: "+INPUT); System.out.println("lookingAt(): "+matcher.lookingAt()); System.out.println("matches(): "+matcher.matches()); } }
the output of the above program
REGEX is: foo INPUT is: fooooooooooooooooo lookingAt(): true matches(): false
- replaceFirst( ) replaces first matching occurrence and replaceAll() replaces all occurrences of the pattern matching.
So we understand how we can use regular expression in java for pattern matching. Regular expressions are quite a powerful tool in java to find, edit and replace the input string.
Hope you enjoyed the article, please share and subscribe to the latest article update.
#regular expression in java#regex in java#java regex#regex usages#pattern matching in java#regex keywords in java#practical usage of regex
1 note
·
View note
Text
Wave 3 Bot Review
First things first; Bah Weep Granah Weep Nini Bong! Since I like playing this game; I thought I’d start up a blog for it. And since Wave 3 is right on the horizon, what better way to start than to give a review of the Bots in Wave 3. These are just my opinions; you might have completely different ones.
T09 Major Shockwave
An interesting card; that works rather well with the original Shockwave from Wave 1. Definitely good for playing mind games on your opponent. Possibly the best SRT in this Wave.
T11 Major Ultra Magnus
Only really a good character if you can keep his armour on him. Bit easy to beat otherwise I’d reckon. And he’s a pattern matcher; so if you don’t build for that he may as well be vanilla on his bot side.
P3 Private Smashdown
Vanilla on bot side. Weapon side punishes mono-colour decks; so might be useful in competitive play.
T19 Private Red Heat
Does Swap Parts when his bot mode ability is used. He will definitely be useful in a certain deck that the enabler card got banned. Assuming of course he doesn’t go the way of Swap Parts and get banned as well.
T08 Major Prowl
Bot mode ability is really good; weapons are a common upgrade to see (whether they be Energon Axes, Flamethrowers, Mining Picks or anything else) so he will like do two direct damage to an enemy when he attacks. Other than that… lack of an alt mode ability is a little disappointing.
T01 Alpha Trion
Battlefield Legend Light. He will definitely see competitive play; either with the aforementioned Battlefield Legend or in place of him.
T13 Private Firedrive
He’s actually a rare Battlemaster ; one with an actual ability on his bot side; one that helps him when he gets KO’d. Useful as a game finisher I reckon.
T25 Raider Aimless
For use in blue decks. Another one with an ability in bot mode. He’s rather nasty if you can get the deck set up for him (3 blue is quite a lot to flip in one attack!) But otherwise; he seems solid to me.
T42 Sergeant Cog
Not sure he should be SRT. He’s vanilla on bot side. His weapon mode ability is nice; and would have been better if Swap Parts wasn’t banned! Should have been a Rare.
T24 Private Trailbreaker
Good if you can keep the Forcefield on him; but a bit so-so otherwise. (Now we just need a Kaon so we can recreate THAT scene.) A Wave filler Transformer.
T33 Raider Nightstick
He’s vanilla on the bot side. His weapon side relies upon a lot of black pips in deck (or a lucky flip!) Would have been a better ability if it did damage I think.
T32 Raider Needlenose
He’s reliant on having star cards in deck. In other words a sink hole (you need to build your deck around him; like Mirage from Wave 1; or Skywarp from Wave 2). Could be fun to experiment with; but won’t see competitive play.
T48 Specialist Ratchet
Another sinkhole. Unless we get some better repair cards; he’s never going to get more than 4 attack boost if you Brainstorm into two Medics. And his alt side is vanilla after the start of the game. Wish he repaired when he flipped to alt mode as well.
T16 Private Mudslinger
Does Fling when his bot mode ability is used. Not sure that particular card was good to begin with. A Wave filler Transformer.
T05 Captain Wheeljack
Again; a vanilla alt side after the game begins. Bot side is good if you run lots of actions that allow you to play multiple actions; but otherwise, not particularly good. A Wave filler Transformer.
T35 Raider Road Hugger
Does Leap Into Battle when his bot mode ability is used. That card is good; and this fellow might be useful as a result. Can give blue decks a bit of a kick (that I’m not sure it needs).
T14 Private Flak
Does New Designs when his bot mode ability is used. Not a bad card; useful in upgrade heavy decks (or turn 1; to play an Upgrade on one of your characters!)
T38 Raider Storm Cloud
Does Focus Fire when his bot mode ability is used. Can also be done with three actions that don’t match for Supercharge. Possibly good in orange heavy decks but only if the deck also runs green/orange cards.
T47 Specialist Flamewar
A bit of a let-down. Two abilities that are a bit so-so. Can we have a different female Decepticon please (like Nickel!)? A Wave filler Transformer.
T40 Raider Visper
Does Sonic Scramble when his bot mode ability is used. Not sure that card was particularly good in the first place (only draws cards back up if all three were played). Guess that makes him another Wave filler Transformer.
T31 Raider Laserbeak
Not a bad ability on either side; good tap ability too. Decent card; but will probably see play with Soundwave only.
T15 Private Lionizer
Probably will go in orange heavy decks. Bold 4 is easily the strongest boost on a weapon (that doesn’t scrap!)
T12 Private Arcee
Another so-so card. She’s alright; but not really a stand out card. A Wave filler Transformer.
T03 Captain Ironhide
This one on the other hand… is actually very good. Easily the best Ironhide. He gives Wave 1 Shockwave the middle finger while in alt mode; and his bot mode ability isn’t bad either.
T10 Major Soundwave
Not really a stand out card. He’s only good with both Ravage and Laserbeak beside him. Shame really; a lot of people have been screaming for him (Now give us Tarn!).
T34 Raider Ravage
Vanilla on alt side. Bot mode ability is a bit disappointing. Not really going to see play; except with Soundwave.
T45 Sergeant Skywarp
Again; like the previous Skywarp, he relies upon the deck being built around him. This one likes Secret actions. Could work with Thundercracker though; if you run enough Secret Actions.
T23 Private Tote
He’s cute. He can be used to untap your other little fellows; but he’s not much good for much else. A Wave filler Transformer.
T18 Private Red Alert
A non-vanilla Red Alert. And a not bad one at that. Could work with Ratchet; as he repairs when you flip to alt mode.
T28 Raider Detour
Does Pep Talk when his bot mode ability is used. Not a bad card; but not sure that he’d be better than Pep Talk itself; except on turn 1.
T41 Sergeant Chromia
I’m happy; because she works well with Ironhide! Both want a blue deck; so they work together. Her ability is similar to Wave 1 Chromia’s, but for blue; much easier to hit.
T02 Captain Elita-1
Prime’s girlfriend and I see her being played with Battlefield Legend. She’s also not a bad card; considering she can sneak all of the damage on to her then trigger a Leap of Faith ability when KO’d.
T46 Sergeant Sparkstalker
One of the Firecons. Good in orange decks; so could see play in them. Can also scrap armour to make it easier to hit enemies for your other bots.
T27 Raider Cindersaur
One of the Firecons. Also very orange orientated. Can do direct damage if he has enough Bold.
T29 Raider Flamefeather
One of the Firecons. Can actually boost his defense when you flip orange while he defends; so is actually the most interesting of the three in my opinion. Shame his alt mode ability only works with the other Firecons.
T30 Raider Ion Storm
Vanilla on alt side. Bot mode side isn’t very interesting. A Wave filler Transformer.
T26 Raider Blowpipe
A card that will only get more potent as the game progresses and more colours get added. He’s not bad at the moment, though.
T07 General Optimus Prime
A bit of a let-down. Won’t see play over Battlefield Legend; as he’s nowhere near as good. Could have been an uncommon; as his ability is really unimpressive.
T06 General Megatron
He’s actually a very interesting card. He would be amazing in a deck with Megatron, Living Weapon… But unfortunately; Living Weapon is also 13*s and can’t be teamed up with the General! That’s the only shame; other than that, possibly the best Megatron.
T37 Raider Runamuck
He’s vanilla on alt side. When he flips to bot mode; his buddy Runabout does as well. Could be a fun combo at release events; and possibly after too!
T43 Sergeant Hound
He’s vanilla on alt side. Bot mode ability has been seen before on Starter Set Megatron. A Wave filler Transformer.
T36 Raider Runabout
He’s vanilla on bot side. When he flips to alt mode his buddy Runamuck flips (and both of them heal 1 damage!) Could be a fun combo at release events; and possibly after too!
T04 Captain Starscream
Another sinkhole Starscream. You need to build a deck around scrapping enemy upgrades for him to be useful. Don’t think he’ll see play over Decepticon King.
T20 Private Sideswipe
Wants to be the last bot standing so he can get big when you flip him to alt mode. Not sure he’s quite as good as Legendary Warrior Bumblebee (who also wants to be the last bot standing). Another candidate in car decks; though.
T22 Private Topshot
Does Incoming Transmission when his bot mode ability is used. Not a bad card; but I’m sure he’d only be useful turn 1 over Incoming Transmission itself.
T39 Raider Triggerhappy
His alt mode ability isn’t bad; especially to get back Grenade Launchers or Power Punches. Since he suits an orange deck; his bot mode ability isn’t bad either (two orange flipped = guaranteed 4 damage!).
T21 Private Stakeout
Does Rapid Conversion when his bot mode ability is used. Again; not sure this card would be preferable over the actual card; not even on turn 1. A Wave filler Transformer.
T44 Sergeant Skrapnel
His bot mode ability is interesting. Not sure he’s as good as Wave 1 Skrapnel; but he’s not bad.
T17 Private Pteraxadon
The weapon mode ability is very good. Brilliant counter to blue heavy decks; if it pays off. Shame he’s not a Dinobot.
I’m sure you’ve all got your favourites; and cards you want most (I know I do!) I hope you all get exactly who you want; and that you have fun playing with these new guys and gals!
1 note
·
View note
Text
Test regex
Static Pattern compile(String regex, int flags)Ĭompiles given regex using specified flags and returns pattern. Returns compiled representation of the regex. The following table shows the methods provided by the Pattern class that is commonly used. Pattern class defines the pattern for the regex engine which can then be used to match with the input string. ReplaceAll method:She sells sea pearls on the sea shore with pearls Regex Pattern Class In Java ReplaceFirst method:She sells sea pearls on the sea shore with shells Input string: She sells sea shells on the sea shore with shells InputString = matcher.replaceAll("pearls") use replaceAll method to replace all occurrences of pattern (" replaceFirst method:" + inputString) InputString = matcher.replaceFirst("pearls") Matcher matcher = pattern.matcher(inputString) String inputString = "She sells sea shells on the sea shore with shells" Let’s see an example of the usage of some of these methods. Regular Expression Implementation Example Return the string representation of the current matcher. Replace the first matching subsequence of the input sequence by the specified replacement string. Replace all subsequences of the input sequence that match the pattern by given replacement string. Return the total number of matched subsequence. Returns end position/index of matched subsequence. Gives the starting index of matched subsequence and returns it. This is captured in the earlier match operation by capturing the group with the specified name. Returns the subsequence matching the pattern. Same as find () but finds the expression to be matched from the given start position. This method finds the next expression to be matched to the pattern. Returns the pattern that the matcher interprets. It has more methods but we have listed only the important methods below. Given below are the common methods of the Matcher class. Matcher acts as a regex engine and is used to perform the exact matching of a character sequence. The matcher class implements the MatchResult interface. Pattern found from 15 to 19 Regex Matcher In Java ("Pattern found from position " + m.start() + print the start and end position of the pattern found The output prints the start and end position in the string where the pattern is found. In the below program we have a simple string as a pattern and then we match it to a string. Let’s implement a simple example of regex in Java. MatchResult Interface: The MatchResult interface determines the regex pattern matching result. An object of type PatternSynta圎xception returns an unchecked exception indicating a syntax error in regex pattern. PatternSynta圎xception: This class defines an unchecked exception. It provides the matcher () method that returns a Matcher object. Like Pattern class, this class also does not provide any public constructors. Matcher Class: The Matcher class object matches the regex pattern to the string. The Pattern class does not have any public constructors but it provides static compile () methods that return Pattern objects and can be used to create a pattern. Pattern Class: A pattern class represents the compiled regex. The package provides one interface and three classes as shown below: But we can work with regular expressions by importing the “ ” package. Java language does not provide any built-in class for regex. Thus after finding the first match aba, the third character ‘a’ was not reused. Thus once a source character is used in a match, we cannot reuse it. Applying the regex from left to right, the regex will match the string “ aba_aba_”, at two places. So now we have to apply this regex to the string. Let’s assume that a regex ‘aba’ is defined. What we do is we apply the pattern to the text in a ‘left to right’ direction and the source string is matched with the pattern.įor example, consider a string “ ababababab”. When we analyze and alter the text using a regex, we say that ‘we have applied regex to the string or text’. Now given a pattern to search for, how exactly does the regex works? Hence, we always require regex to facilitate searching for the pattern. So in a computer application, we may have a continuous requirement of manipulating various patterns. Why do we search for a pattern in a string? We might want to find a particular pattern in a string and then manipulate it or edit it. Regular Expression Implementation ExampleĪ regular expression is mainly used to search for a pattern in a string.
0 notes
Text
Grep manual
When the -c or –count option is also used, grep does not output a count greater than NUM. When grep stops after NUM matching lines, it outputs any trailing context lines. This enables a calling process to resume a search. If the input is standard input from a regular file, and NUM matching lines are output, grep ensures that the standard input is positioned to just after the last matching line before exiting, regardless of the presence of trailing context lines. ) -m NUM, –max-count= NUM Stop reading a file after NUM matching lines. The scanning will stop on the first match. l, –files-with-matches Suppress normal output instead print the name of each input file from which output would normally have been printed. L, –files-without-match Suppress normal output instead print the name of each input file from which no output would normally have been printed. The deprecated environment variable GREP_COLOR is still supported, but its setting does not have priority. The colors are defined by the environment variable GREP_COLORS. ) –color, –colour Surround the matched (non-empty) strings, matching lines, context lines, file names, line numbers, byte offsets, and separators (for fields and groups of context lines) with escape sequences to display them in color on the terminal. With the -v, –invert-match option (see below), count non-matching lines. General Output Control -c, –count Suppress normal output instead print a count of matching lines for each input file. x, –line-regexp Select only those matches that exactly match the whole line. Word-constituent characters are letters, digits, and the underscore. Similarly, it must be either at the end of the line or followed by a non-word constituent character. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. ) -w, –word-regexp Select only those lines containing matches that form whole words. ) -v, –invert-match Invert the sense of matching, to select non-matching lines. ) -i, –ignore-case Ignore case distinctions in both the PATTERN and the input files. The empty file contains zero patterns, and therefore matches nothing. ) -f FILE, –file= FILE Obtain patterns from FILE, one per line. This is useful to protect patterns beginning with hyphen-minus ( –). Matching Control -e PATTERN, –regexp= PATTERN Use PATTERN as the pattern. This is highly experimental and grep -P may warn of unimplemented features. P, –perl-regexp Interpret PATTERN as a Perl regular expression. ) -G, –basic-regexp Interpret PATTERN as a basic regular expression (BRE, see below). ) -F, –fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. Matcher Selection -E, –extended-regexp Interpret PATTERN as an extended regular expression (ERE, see below). This version number should be included in all bug reports (see below). V, –version Print the version number of grep to the standard output stream. Options Generic Program Information –help Print a usage message briefly summarizing these command-line options and the bug-reporting address, then exit. Direct invocation as either egrep or fgrep is deprecated, but is provided to allow historical applications that rely on them to run unmodified. In addition, three variant programs egrep, fgrep and rgrep are available. By default, grep prints the matching lines. Grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus ( –) is given as file name) for lines containing a match to the given PATTERN. You will have to remove those if your input contains more than just the addresses.Grep, egrep, fgrep, rgrep – print lines matching a pattern Synopsis Note however that some of the expressions are used to match only the IP address and therefore contain beginning- ( ^) and end-of-line ( $) characters. You can find lots of IP address regular expressions on the web, see for example this StackOverflow question. grep -o 192.1.* zĪny line starting with 1921 will be matched, and only the matching part will be printed because of the -o switch.* matches anything up to the end of the line, including the empty string. Only 1921 will be matched, and only the matching part will be printed because of the -o switch. Your input does not contain data where this makes any difference. will be matched, and only the matching part will be printed because of the -o switch.
0 notes
Text
Take the test: Are you Britain’s next super-matcher?
Take the test: Are you Britain’s next super-matcher?
Do you have natural forensic detection skills? Find out if you are one of those rare individuals who have the ability to compare complex visual images and identify matching patterns. Participate in the study, take the online test, and find out if you are a “super-matcher”. Image: Example “match” trials for each comparison task (face: upper-left panel; fingerprint: middle-left panel; potato…
View On WordPress
0 notes
Text
Wow, a lot can change in about a year, huh. I was there for TB2, but tapered off it and TB1 sometime for real-life reasons, just before the Girls Gone Astray event in 2… but I’ll leave my thoughts for the end of this (the playthrough).
With version 5.5.3, Terra Battle now has an ending. For the most part, I’m going to be aiming just to finish that. I got to chapter 36 before I stopped playing, so chapter from now to at least chapter 34 will be several versions behind. But nevertheless, onwards:
Chapter 30: Rising World – “The will of countless creatures great and small converges into a single purpose: to protect the future.”
30-1 They live solely for vengeance.
Things are coming to a head, now.
30-1 is five rounds of these two enemies. They aren't too out of the ordinary. The Oxsecian Striker’s Rocket Force move doesn’t do damage, just displaces your units.
30-2 The rancor that has festered in their souls for so long.
The Oxsecian ship unleashes its weapons en masse on Animata, intent on retribution.
This is the day they will finally purge themselves of the rancor that has festered in their souls for so long.
A new face among the two enemies seen in 30-1: sentient space junk! They appear in the second, fourth, and fifth battle alongside some other mooks. Take care of the Oxsecian enemies while hopefully staying out of range of the Space Debris’ status-inducers.
Of the two, sleep is less annoying, so it’s not a bad idea to bring someone with Panacea (at the very least, Palpa will have it, but there’s also have Eileen and Gatz or Sheena w/ Cleansing Caper), or even just Locomotion (Palpa again, but Bonna and Kana are notable for having it while also having Paralysis Ward. Kana’s A class so most people likely have her anyway).
Of course it’s a complete non-issue if you get rid of them first and/or stay out of the AoE, but it never hurts to be careful.
30-2 introduces this, the sword counterpart to the other.
30-3 The king does not budge.
Three battles this time: Space Debris/Oxsecian Bladebots make up the first and third battles; latter is notable since there’s 10 Bladebots to deal with.
30-4 With a subtle, slithering movement.
This introduces the Oxsecian Spearbot. Fairly self-explanatory.
There are no Space Debris in this stage; just Bladebots, Spearbots, and Strikers.
30-5 The sound of a massive explosion rips through the air.
This battle is of spear-enemies, so if you’re not overleveled like my crew, arrows are better.
This enemy is introduced here, and I guess is notable because it has Solar Wind, the at-the-time strongest Fire elemental spell (at 3x damage). Its in a cross range, so I guess be aware.
30-6 Shield with Animata.
Four battles this time. There’s another new enemy: another Elemental Spinner, this time ice-typed, with Absolute Zero, Cross (1).
30-7 Trust in me, overworlders!
There aren’t any Elemental Spinners here; just fights against Oxsecians.
30-8 Their collective will is sublimated into radiant life.
Their collective will is sublimated into radiant life that illuminates all.
“That radiance, washing over you, becomes a source of newfound strength.”
Before the battle starts, you get the message above. What this does, as you may notice, is fill up the Powered Point gauge to near-full.
There’s only one battle in this stage; the boss is the Oxsecian Fighter EX (as noted by the 4x4 square), with a whopping 16 Oxsecian Strikers backing them up. For the most part, though, it’s not too bad: its moveset is really simplistic, with the only skill you have to be concerned about being Missile Barrage.
It helps that the mooks have a number of turns before they act, giving you time to pincer them and create some breathing room. They’re all staff, so no circle of carnage advantages. For a pack like this, you’d probably want at least one mage for their AoE attacks.
Its laser attack is column only, so just stay out of range.
It will telegraph when it’s about to use Missile Barrage, saying sth among the lines of “Missile Launchers open”; you have a turn to prepare, heal, etc. If you bring anything that has an Ice attack, this will happen, making it lose its turn.
After that, it’s just a matter of chipping it down and any other Strikers it summons. Finally, it can drop Dark Matter and/or Mantle Helixes.
30-9 The power of will evokes a miracle.
The formidable will of the humanoids rouse an even greater power: the beasts that inhabit this world you once dubbed Planet Beastbait.
Humanoid and beast alike stand ready to confront the alien threat.
The resolve to defend their home--and the home of future generations--converges into one will, transcending ecosystems and the planet itself.
The will of countless creatures great and small converges into a single purpose: to protect the future.
As one, they raise their voices in a thunderous rallying cry to that future.
Hmm...
After that fight, 30-9 returns to the 5-battle stage. Another Elemental Spinner is introduced. Good thing there’s no elemental mixing and matching.
Ba’gunar was helpful for dealing with them, with both type advantage + summoning capsules. If you’re not like me and have great luck, managed to pull someone like Samatha or Jennish – even better.
As an aside, there’s a chance of nabbing a Demon’s Badge otomo from this stage. Its evolved forms eventually provide Death Ward, self – which has some niche uses, I guess!
30-10 AND SO WE RETURN TO ZERO!
Everyone was too caught up in the battle to notice they vanished. But then, perhaps it isn’t a surprise they came back given what we’ve seen of them in previous chapters…
Before the battle even starts, we see each member of the Zero Series fuse together into…
6ZOO. He’ll always start the battle with Cyclone, Area (1), which does damage and knocks units back. At level 99 with those stats, he’s pretty beefy.
He has Counterattack, but it will always proc when pincered. He also summons two mooks too after using Cyclone; in fact, he follows a pattern of: Cyclone > summon two mooks matching its type > switch weapon. The weapon type switches from Sword (default) > Spear > Bow > Staff, then repeats.
The Staff form is notable because 6ZOO doesn’t summon anything, but will spend a turn preparing to use Quake, All. It’s one of the reasons I brought Gatz.
The mooks aren’t too bad, but their attacks can add up as 6ZOO beats your team down. As you clear them, take note: 6ZOO will use Supporting Fire whenever one of the mooks is pincered. Keeping health topped up is seriously important, and this is with a mainly B-class team that’s near his levels. (Fun fact for non-vets: levels used to be maxed out at 70.)
Once you wear it down, it says this…
Music (listen to this!): The World’s Awakening/Day of Reckoning
…and transforms again, recovering HP and becoming even more monstrous! This time around, it stays Staff-typed, but switches elements around. As it does, it not only summons corresponding Elemental Matchers, but also absorbs attacks of the same element.
Not a problem if you’re bringing a majority-physical team like I did, but…
A few turns in, you’ll get this message. It’ll telegraph the big moves, then follow up w/ the corresponding elemental aim attack (except when its Dark-typed):
An inescapable gravity field takes hold… > Black Hole
Crackling bolts cross and spread outward… > Tempest (Cross)
An inferno blazes up on both sides… > Wall of Hellfire, 1 row
A band of frigid air descends… > Icicle, 1 column
Watching and waiting… > Terra Panic, All (occurs at ~25-30% HP)
Tempest and Icicle are explanatory: they’re strong elemental attacks. Wall of Hellfire creates flames on the rows 6ZOO is on – it’s a really damaging stage hazard, though mercifully it only lasts a couple turns and can kill off the mooks. Black Hole transports two random units away for a few turns.
Terra Panic is its big move; it affects everyone with every status effect except Ice/Shadowbind and the Solar/Lunar related ones. As a reminder:
Poison: damages units for a few turns. (not bad normally because it never kills your units, but could potentially help the boss/mooks)
Sleep: units don’t act and can’t be moved for a few turns or until they take damage. (the least dangerous, but iirc they can still be shifted)
Paralysis: unit don’t act and can’t be moved for a few turns. (You can still shift them away, though)
Demoralize: unit’s physical attack and skill proc rate drops to 0 for a few turns; buffs still proc, while demoralized units can still use skills w/ a Powered Point (though physical attacks will hit for peanuts)
Confusion: unit moves around randomly, cannot be controlled, act in chains, or be used to pincer. (This one is pretty bad because your unit is useless until it wears off, and they can put themselves in range of attacks or run through Wall of Hellfire if it’s up)
Petrification: unit turns to stone, cannot be controlled, and can’t be shifted by other units. (IMO the worst status effect because it pretty much never wears off; your units get petrified for 99 turns! By then the battle is over, either with your units dead or the boss dead.)
This is why it’s good to bring along a Remedy character or two. I had Gatz (who has Sleep Guard, Adjacent and Panacea by J3) but Bonna comes to mind because her J1/2 teach skills that cure Petrification and Paralysis while she herself gets Petrification/Paralysis Ward, but again, there’s Palpa. Just hope she doesn’t get petrified…
I was lucky to not get petrified, but this was pretty bad, too. Everyone was a sitting duck while Sorman and Zan were off who-knows-where after getting Black Holed.
Thankfully after that, things are fairly smooth sailing.
Now, onto the epilogue…
“What is happening?”
“What are we to do?”
“I do not understand.”
“This is no fault of your own. It is simply that I have chosen a brighter future. Forgive me.”
“Father…”
A strange sound emanates from the Oxsecian ship.
“Sire, what have you done?”
It was 6ZOO who set the Oxsecian Ship on its suicidal course.
He sought complete and utter destruction, even if it meant his own end. He desired nothing more and felt no attachment to life.
He was the perfect weapon, destruction incarnate. This was the mission assigned him by his king.
But the king had realized the error of his ways.
“I have changed the ship’s course.”
“WH… WHERE TO?”
“Is there somewhere you wish to go?”
6ZOO does not answer. He has collapsed into a heap of inorganic material.
Animata is a massive technological life form. Humans, lizardfolk, beastfolk, stonefolk, and the children of the Oxsecians dwell within her.
All of these are species created from DNA plundered by Animata in her travels. Each has a home world somewhere in the vast universe.
As anyone might do, they seek out their roots to discover their origins.
There’s something really poignant about that simple message, accompanied by that backdrop.
It’s been a long time coming, hasn’t it? With this, part one of Terra Battle is finally, finally complete. Though this may be done, there’s still more left to do. I’ll be putting up the table of contents for part one, and from there on it’s just catching up to my story progress in-game.
Finally: that final boss theme tho, god bless Uematsu. Fantastic track, in a game with great music. I actually remember getting some chills when I played through 30-10.
2 notes
·
View notes
Text
#'how could people back then believe in ghosts' #Mate your aunt in Ohio believes the government can control the weather because she knows about cloud seeding so project haarp seems legit
#This is not a novelty in the human condition #We are top notch pattern matchers #The problem being that if something matches a pattern that is not reflective of reality #We will 100% choose the pattern over the facts by default
#And even when we work very hard not to #We STILL prefer the pattern to the truth like MOST of the time #see also: medical bias and the replication crisis
(wanted to incl. these great tags by @vergess)
this is why spiritualism was so popular in the 19th and 20th centuries!! this right here! insane discoveries about electricity and physics and the body and brain were happening ALL THE TIME, who was to say what could be discovered next!!!!!
376 notes
·
View notes
Text
$16,000+ raised so far for Harry’s birthday
@1dfansgive‘s charity drive for Harry’s 24th birthday is currently at 68% with a about 3 2 days to go. Drop4Drop is a great charity that works to provide access to clean water. Harry, Robin and Anne have previously donated to this charity.
Link to drive: justgiving.com/harry24
Raffles:
See Harry in Nashville - VIP: Thanks to @roseandbee, you can win a chance to see Harry on tour at Bridgestone Area in Nashville on June 12, 2018 with a VIP ticket!! Entries are $24 and should be tagged as #HarryinNashville. See here for additional rules. PLEASE READ RULES CAREFULLY FOR THIS ONE.
See Harry in LA: Thanks to @oopshazzalou, you can win a chance to see Harry on tour at The Forum in Los Angeles on July 14, 2018. Entries are $10 and should be tagged as #HarryinLA. See here for additional rules.
Embrace package: This gift set donated by @cher1808 includes an Embrace tote, HS album, Louis’ BTY CD, a Treat People with Kindness pin and adorable stickers. Entries are $5 and should be tagged as #embrace. See additional rules and pictures here.
Pins by millypins: @millypins is giving away pins to 10 winners! Entries are $12.94 and should be tagged as #millypins. See here for exact pins.
Hand Drawn Card/bracelet by Pasmwa: @p-a-s-m-w-a is offering hand drawn cards of whatever you want and handmade bracelets. Entries are $5. See here for additional rules and card/bracelet examples.
Nautical mug/MITAM CDs: @chelsea-frew has donated a Starbucks mug featuring a mermaid, anchor and rose as well as Target Exclusive Harry and Louis MITAM CDs. All items are brand new and no longer available in store. Entries are $5 and should be tagged as #mermaid. See here for additional rules.
Rolling Stone/HS CD: This raffle is for a copy of Harry’s cover of Rolling Stone as well as Harry’s album. Entries are $5 and should be tagged as #RollingStone. See here for cover and details.
Another Man: Donated by @louistomlinstonismypatronus, here is your chance to win a copy of Another Man. Entries are $5 and should be tagged as #AnotherMan. See here for exact cover.
See Harry in MN: Thanks to @jumpsuitsue, you can win a chance to see Harry on his tour in St Paul, MN on July 1, 2018. Entries are $10 and should be tagged as #HarryinMN. See here for additional rules.
Other ways to participate:
Cross Stitch: A generous crafter in the UK has donated pre-made cross stitches, some framed, some unframed. Each one is listed individually in our shop. Hurry! Many of them have been sold already! See here to visit shop.
*UPDATE* Matching Donations: We are currently caught up with the number of matchers/donors. If anyone wants to match donations, let me know.
Hidden Doodles: @lucystarkid has created a range of cards and prints featuring iconic images/tattoos. Only a limited number are available so don’t miss out. 25% of the proceeds will go Harry’s drive. Lucy will now also be including two A6 pen sketches with each order. See here for additional information and here to visit her shop.
#HarryStitchAlong: @lizloveslyrics created and donated a pattern of Harry’s album. Purchase the pattern here. Join the party and post your progress along with everyone else.
*UPDATE* Raffle/Giveaway by sometimesambroswrites: Win adorable handmade creatures by @sometimesambroswrites. She has generously changed her offer so anyone who participates will get an adorable creature! See additional details here.
*NEW* clevernessoflarry’s art stores: @clevernessoflarry is donating all proceeds from her stores from now until Harry’s birthday! See here for more details and links to her stores.
Link to drive: justgiving.com/harry24
#Thank you to everyone for their generosity#whew this list got long#i sincerely apologize if i forgot anything??#i messed up the LA link#its been fixed now#removed auctions
153 notes
·
View notes
Link
If you have ever used aptitude a bit more extensively on the command-line, you’ll probably have come across its patterns. This week I spent some time implementing (some) patterns for apt, so you do not need aptitude for that, and I want to let you in on the details of this merge request !74.
so, what are patterns?
Patterns allow you to specify complex search queries to select the packages you want to install/show. For example, the pattern ?garbage can be used to find all packages that have been automatically installed but are no longer depended upon by manually installed packages. Or the pattern ?automatic allows you find all automatically installed packages.
You can combine patterns into more complex ones; for example, ?and(?automatic,?obsolete) matches all automatically installed packages that do not exist any longer in a repository.
There are also explicit targets, so you can perform queries like ?for x: ?depends(?recommends(x)): Find all packages x that depend on another package that recommends x. I do not fully comprehend those yet - I did not manage to create a pattern that matches all manually installed packages that a meta-package depends upon. I am not sure it is possible.
reducing pattern syntax
aptitude’s syntax for patterns is quite context-sensitive. If you have a pattern ?foo(?bar) it can have two possible meanings:
If ?foo takes arguments (like ?depends did), then ?bar is the argument.
Otherwise, ?foo(?bar) is equivalent to ?foo?bar which is short for ?and(?foo,?bar)
I find that very confusing. So, when looking at implementing patterns in APT, I went for a different approach. I first parse the pattern into a generic parse tree, without knowing anything about the semantics, and then I convert the parse tree into a APT::CacheFilter::Matcher, an object that can match against packages.
This is useful, because the syntactic structure of the pattern can be seen, without having to know which patterns have arguments and which do not - basically, for the parser ?foo and ?foo() are the same thing. That said, the second pass knows whether a pattern accepts arguments or not and insists on you adding them if required and not having them if it does not accept any, to prevent you from confusing yourself.
aptitude also supports shortcuts. For example, you could write ~c instead of config-files, or ~m for automatic; then combine them like ~m~c instead of using ?and. I have not implemented these short patterns for now, focusing instead on getting the basic functionality working.
So in our example ?foo(?bar) above, we can immediately dismiss parsing that as ?foo?bar:
we do not support concatenation instead of ?and.
we automatically parse ( as the argument list, no matter whether ?foo supports arguments or not
apt not understanding invalid patterns
Supported syntax
At the moment, APT supports two kinds of patterns: Basic logic ones like ?and, and patterns that apply to an entire package as opposed to a specific version. This was done as a starting point for the merge, patterns for versions will come in the next round.
We also do not have any support for explicit search targets such as ?for x: ... yet - as explained, I do not yet fully understand them, and hence do not want to commit on them.
The full list of the first round of patterns is below, helpfully converted from the apt-patterns(7) docbook to markdown by pandoc.
logic patterns
These patterns provide the basic means to combine other patterns into more complex expressions, as well as ?true and ?false patterns.
?and(PATTERN, PATTERN, ...)
Selects objects where all specified patterns match.
?false
Selects nothing.
?not(PATTERN)
Selects objects where PATTERN does not match.
?or(PATTERN, PATTERN, ...)
Selects objects where at least one of the specified patterns match.
?true
Selects all objects.
package patterns
These patterns select specific packages.
?architecture(WILDCARD)
Selects packages matching the specified architecture, which may contain wildcards using any.
?automatic
Selects packages that were installed automatically.
?broken
Selects packages that have broken dependencies.
?config-files
Selects packages that are not fully installed, but have solely residual configuration files left.
?essential
Selects packages that have Essential: yes set in their control file.
?exact-name(NAME)
Selects packages with the exact specified name.
?garbage
Selects packages that can be removed automatically.
?installed
Selects packages that are currently installed.
?name(REGEX)
Selects packages where the name matches the given regular expression.
?obsolete
Selects packages that no longer exist in repositories.
?upgradable
Selects packages that can be upgraded (have a newer candidate).
?virtual
Selects all virtual packages; that is packages without a version. These exist when they are referenced somewhere in the archive, for example because something depends on that name.
examples
apt remove ?garbage
Remove all packages that are automatically installed and no longer needed - same as apt autoremove
apt purge ?config-files
Purge all packages that only have configuration files left
oddities
Some things are not yet where I want them:
?architecture does not support all, native, or same
?installed should match only the installed version of the package, not the entire package (that is what aptitude does, and it’s a bit surprising that ?installed implies a version and ?upgradable does not)
the future
Of course, I do want to add support for the missing version patterns and explicit search patterns. I might even add support for some of the short patterns, but no promises. Some of those explicit search patterns might have slightly different syntax, e.g. ?for(x, y) instead of ?for x: y in order to make the language more uniform and easier to parse.
Another thing I want to do ASAP is to disable fallback to regular expressions when specifying package names on the command-line: apt install g++ should always look for a package called g++, and not for any package containing g (g++ being a valid regex) when there is no g++ package. I think continuing to allow regular expressions if they start with ^ or end with $ is fine - that prevents any overlap with package names, and would avoid breaking most stuff.
There also is the fallback to fnmatch(): Currently, if apt cannot find a package with the specified name using the exact name or the regex, it would fall back to interpreting the argument as a glob(7) pattern. For example, apt install apt* would fallback to installing every package starting with apt if there is no package matching that as a regular expression. We can actually keep those in place, as the glob(7) syntax does not overlap with valid package names.
Maybe I should allow using [] instead of () so larger patterns become more readable, and/or some support for comments.
There are also plans for AppStream based patterns. This would allow you to use apt install ?provides-mimetype(text/xml) or apt install ?provides-lib(libfoo.so.2). It’s not entirely clear how to package this though, we probably don’t want to have libapt-pkg depend directly on libappstream.
feedback
Talk to me on IRC, comment on the Mastodon thread, or send me an email if there’s anything you think I’m missing or should be looking at.
via Planet Debian
0 notes