April 2009 Archives

SQL, how strange art thou

| 11 Comments

One of the things I've been working on lately is an architecture for lexers, and I'm basing my work off an existing SQL lexer I have access to. The lexer is well-factored, so refactoring it into a more generic tool is pretty simple. However, while doing this, I ran into a behavior that I thought was strange. I'm sure you've seen the same thing in your own coding: you take some working code, refactor it, test it out and notice some strange behavior and wonder "did I break something?" In my case, I was noticing that my lexer was reporting the following as two distinct tokens (instead of some sort of error). The text I was entering was:

2foo

I found it strange because what my lexer was telling me is that I was getting a NUMBER followed by an IDENTIFIER. So I did a bit more poking, and it was even more interesting than that.
2.1.1

That was returning NUMBER NUMBER!

So I was checking over my code to see if I had somehow introduced a new behavior, but realized that I hadn't. This behavior had been there since long before I got my fingers into the code. Surely I had just found a rather obscure lexer bug, right?

Wrong.

In SQL, tokens do not need to be separated by whitespace if they can be unambiguously distinguished while lexing. In the two cases I provided above, the lexer can easily figure out the answer in an unambiguous manner. But this has some rather funny ramifications.

select(*)from'sometable'where.1=.1

Hard to read, but perfectly legal SQL statement right there. My understanding of why you would actually want to do something like this is as a front-end optimizaton to your queries. Basically, if you're going to send a plain text query over the wire, you may want to run it through some sort of minimizer first to reduce the size of the query. The only other explanation I can come up with is that it also makes for an interesting blog posting! ;-)

Made it!

| 7 Comments

I made it in to France safe and sound. My flight from Ontario to Dallas was pretty uneventful, though they managed to land a bit late. So that meant I got to run from one side of DFW to the other, and was basically one of the last people on the plane to France. Thankfully, I had a stroke of good luck on that plane -- no one sat next time (it was one of the only open seats on the plane, too). The flight in to France was just as long as I remembered it. The movies were horrible (Madagascar 2 and Nim's Island), but Lis sent me off with a few good books to read. I landed in Paris right on time, but very sleepy.

I went from the airport to the hotel to drop my stuff off, and then in to the office. Boy, it was a long day! By about 4pm, I was certain I was going to die if I didn't get some sleep, so I went back to the hotel, ate a bit of dinner and was asleep by about 5:30pm. Of course, the other joy of the massive time difference is that I was awake at 4am today. :-P I forced myself to stay in bed until 5, but then got up and played a bit of WoW to pass the time. At 7, I decided it was time for work, and so here I am!

Alone.

I forgot that no one gets in to the office until later. So I'm here with the maid service. :-P

Happy Birthday!

| No Comments

It's Elissa's birthday today, and she turns.... hahaha, not gonna say. ;-)

It's frickin hot out today. According to my thermometer, it's 101 degrees in the shade. I head out to France tomorrow for a week of work, and the temps appear to be in the 60s (F) during the day, which will be a delightful contrast to this crap. The downside is that Lis can't join me on this trip because of her thesis. I'm actually hoping this trip goes pretty fast though, since we have a lot of stuff going on around here (like getting ready to move, Lis finishing her thesis and defending, etc).

Elissa's Birthday Weekend

| 1 Comment

Elissa's birthday weekend started today (Friday is weekend enough I suppose, right?), and we did it up in style! We went to the Cheesecake Factory for a nice bday lunch, and I consumed a disgusting amount of food. The burger was ok, the fries were ok, but the cheesecake was sickeningly awesome! Now we're both recovering in our own little ways: Lis is taking a nap before heading back to school, and I'm doing design work for a project I'm working on at 4D.

We're going out somewhere this weekend to do a bit of hiking, probably tomorrow. Currently, the choices are Joshua Tree, some tide pools near Laguna Beach, or the Citrus State park here in Rivertucky. It all depends on the weather and how much stuff Lis has to get done on her paper. She just heard back from someone on her committee today, and he gave her a lot of great feedback -- a blessing and a curse. It's awesome that he's giving her such valuable information. It sucks that it means she has more work to do. ;-)

I've been in a very wintery mood lately. Not getting to see snow or have an actual season for the past few years has really worn me down. Don't get me wrong, I'm looking forward to spending this summer in MN! And I'm incredibly excited about seeing a true Fall this year. But I am a bit sad that I missed out on such a snowy winter this year.

Ulduar and 3.1

| 1 Comment

Hooo boy, I was like a kid in the candy store last night. Elissa got home just after the server came up, and I basically gave her a kiss and said "I'll see you tomorrow." She's so sweet to let me have my addictions. :-D

My server came up about 6pm PDT after 13 hours of downtime, but I managed to get in without having to wait in any queue once it was up (I'm on Malorne, btw). The first thing I did was go get my dual spec and fixed all my talent points. What's kind of funny though, is that I don't have a particular need for dual specs. As a hunter, I'm a pure DPS class. So it was mostly just a "gotta have it" way to waste 1k gold.

Once my talents were all fixed up, my guild started a 10-man raid for Ulduar and I was one of the lucky ones to come along. Yay for being a core raider! We did down Flame Leviathan, but it took us quite a few tries. He's actually bugged out for us on our server. He's supposed to target siege engines until they're all dead, but it turns out that (at least for us), he was targeting demolishers more frequently. So it took a while before we downed him, but we did do it! We wandered over to the second boss only to find out that no one on our server had downed him because he was also bugged out. So we didn't even bother trying -- instead, we went to the "new" VoA to check out how that had changed. You'll never guess what happened though -- yup, the new boss was bugged out. You couldn't target him, he was just standing there. No one could aggro him at all, he simply wouldn't engage. LoL, so needless to say, I've not been terribly impressed with the quality of the patch so far. It appears to have a ton of issues, go figure.

That being said, one thing I was happy about is that the nerf bat didn't affect me too bad this release. Yes, my Exploding Shot did get smacked with a straight-up nerf. However, I found that my DPS actually stayed the same as pre-patch because of Black Arrow. I still pull 2.5k DPS self-buffed, and I suspect I'll still pull 4.5k DPS in 25-man raids. It was nice to dodge that bullet for once!

Only other happy WoW news is that herbalists and alchemists got some serious love with this patch. We now pick more herbs per node, and can make twice as many flasks with the same amount of mats. It looks like I did a good thing by going herb/alch a few weeks ago. I made a killing selling flasks over the past two days (almost 1k gold from the AH). :-D

Meet the new boss, same as the old boss

| 8 Comments

Hey everyone! After a brief hiatus while I pulled the old content offline and archived it, Ramblings is back up and running. I took this opportunity to destroy the old databases and start over entirely from scratch. While this will have no effect on anyone reading this, it will save my buddy Adam a lot of hair, and me a lot of rum payments.

I'm really excited to see the 3.1 patch came out for WoW today. It's going to be hard to wait for work to get done so I can hop on and see how things have changed. I'm a bit worried that the Exploding Shot nerf is going to hurt too much. But honestly, this is the first patch where the hunter nerf bat wasn't too bad on its face. It's not like they're nerfing our DPS by 30% like the last patch. :: coughs ::

Elissa has only a few weeks until she'll be done with her thesis and submits it to her committee. We're both incredibly excited about this because it means we'll be moving back to MN pretty soon! She has to wait a month until she can defend, but it looks like she's on track for June 13th graduation. w00t!

Ok, time for me to get back to work -- just wanted to let everyone know that Ramblings is back online.

August 2009

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31