March 21, 2003

RegEx in C/C++

With my daughter on spring break I decided to take the day off yesterday and spend it with her. Original plan was to visit the Vancouver Zoo, but the rain was so heavy we had to nix that, and decided to head to the aquarium.

The aquarium is a place from my youth I have always enjoyed. Since the days of the TV show Danger Bay I thought I would enjoy being a marine biologist, focused on whales since I love them so much. (Well, that was until I watched the 1977 thriller flick "Orca" when killer whale has an ENTIRELY new meaning). I thought it would be fun to take my daughter to enjoy the whales and other marine life.

First off, the old whale tank is now a large haven for the resident dolphin "Spiniker". So with no killer whales there, we were content watching the belugas. During the amazing dolphin show, I realized WHY I don't normally go out to crowded areas with parents and their kids. I CAN'T STAND THEM.

It's not personal. I hate all people equally. But when adults have their kids, they turn into entirely different beasts. I have never been in such close quarters with the rudest people in the world. Don't believe me... lets see if I can sum it up:


  • While standing in line to get some lunch at the cafe, I got sacked by a kid throwing his arms around during a tantrum. Mother looks right at me and instead of apologizing, looks at the kid and says to me "What can you do". How about calming yer fsking kid down. DON'T BUY HIM ANY MORE SODA!

  • While standing patiently waiting for the dolphin show to begin, with my daughter standing on the bench with me behind her, some guy with 4 kids pulls the back of my jacket and tells me to move as his kids need to get in there, and this show is for kids. He did not ask me... he told me how it was. Then to top it off, he stands in front of me so one of his kids, sitting on his shoulder, could get a good view. I was so vexed I almost threw him in the tank. If he wouldn't have had that kid on his shoulders, I might just have done that. (Atleast my daughter got to see the show)

  • While waiting in line so my daughter could enjoy face painting, an impatient mother walks in to the front of the line (where my daughter is patiently waiting her turn), pulls a kid off a chair (not her kid mind you) that was just finished and throws (literally) her kid in there and says it's her kid's turn(which it wasn't). She acted like her kid was the only one that matters, and of course that as the mother we should all hail her as queen of the mothers. Queen of the bitches would be more like it. While counting to 20 to try to calm down one of the aquarium employees (who i think was just as frustrated with this demon of a mother) kindly takes my daughter and gives her the most amazing attention I ever saw. While making the queen bitch jealous, it calmed me down to see my daughter get some real attention. Of course the queen bitch then calls her other kid to then sit down when her first kid was finished, leaving the next kid in line disappointed she had to wait some more. At that point I wanted to say something, and in my minds eye I did, and had her run away flustered that anyone would stand up to her. I was pretty sure I got the closest thing you could get to a standing ovation when everyone is already standing. And then I snapped back to reality and realized it was a flashing day dream. That kinda made my day, but still... if you haven't caught it yet... she was a bitch!

  • While walking to the Amazon area, a very small kid ran through my feet and tripped me up. Now, it was actually kind of cute, and the mother was apologetic. But the dick holding the door decides he wants nothing to do with this, and lets the door go and basically smacks the little kid down when the door closed on her face. In great pain, the little girl is crying and the guy turns and walks away. Jerk should have had his lights punched out for that. Even though it wasn't my kid, it wasn't right

  • If a family with like 10 kids comes to the aquarium, do they have the right to pile all their coats, bags and stuff around the benches at the underground beluga wathing area, saving the benches for later when we are sitting there? I swear I thought a closet blew up. With no parents in sight. Just crap everywhere. And then when we sit on the precious benches, we are informed they are THEIRS after about 10 minutes, as their stuff is thrown all around it. I'm so sorry. I didn't know this east indian covenant existed in Canada. *Sigh*

  • Spring Break + Kids = Packed Aquarium of screaming kids. Need I say more?

I could go on, but its not worth anyones time to read about it. Lets just say I
now know why I hate people. I leave the house to have an enjoyable day with my daughter, and end up tied in knots with the stress of such an event. I have no clue how raskal made it through the day when he went earlier this week. Atleast my daughter had a good time, which made the trip a success.

Today I am back at the grind stone. Having a lot of fun actually. I hacked in support for perl-style regular expression parsing into my C/C++ code this week. It's good for untrusted user validation. I used the PCRE engine which is used in Apache and Exim, and I must say it was a neat addition. I like being able to use regex in C++ code when moving data between any untrusted to trusted boundry. Now I just got to fight with some neat regex tricks to do more complex checking. Which reminds me, I need to get back to that. TTYL

Posted by SilverStr at March 21, 2003 09:59 PM