Latest News >> 2008-07-20 2008-06-25

I’ve been completely fed up with news/feed/rss/atom readers these days. I use Linux as my primary operating system, and I only have a few feeds that I want to rip through quick so I can get to reading the content. Yet, trying to find a reader that doesn’t suck donkey balls has been a chore.

2008-06-21

Wanna know what all the Ruby vulnerabilities are? Or at least have a fun look at how to search through code for clues? It’s a blast.

2008-06-13

I’m dropping a large blog post on everyone to just say that I haven’t died, I’ve just been busy working on my book for A/W about Mongrel. I had contracted with them to do a book about deploying Mongrel, but then decided it wouldn’t be a very good book since we’d already done one about that topic and there wasn’t too much more to say.

Well I just popped my Python cherry by releasing the Zapps project to the world. Zapps is a fork of Amit Patel’s Yapps2 that I’ll be using to do the Python Stackish parser and Utu protocol design. Yapps2 is a great little parser generator that is easily hackable, so adding things like binary parsing and improving the performance is very easy.

I contacted Amit about adopting the project, but he recommended I fork it and even gave me the name: “Zed’s Additional Python Parsing System”. I like it, and it’ll be a fairly small little project amounting to some small tweaks and code cleanups to his.

This 0.1 release mostly just moves the code around so that it works better in distutils, and includes the stackish.g example files. This is a fully functioning Utu Stackish protocol parser producing the exact same data structure as the comparable Ruby version. This one however is very accurate.

This release also introduces the start of a new production for processing binary data. In the Zapps grammar you can include tokens that have python struct syntax. They don’t do anything now except print the format out, but in the future you’ll be able to put a binary unpacking token into the grammar and then your parser will handle binary data and convert it to your needed format.

I’ll also look at adding erlang style bitfields, although those annoy the hell out of me.

The included stackish.g file also has an experimental BLOB type modifier that lets you indicate a python pack format rather than a size. The size will be inferred from the pack format, and then rather than a raw BLOB type, you’ll get a BLOB that you can use to unpack the data.

Here’s how you’d try it out:

$ sudo python setup.py install
$ zapps examples/stackish.g
$ python examples/stackish.py
>>> [ 'hhl:1234567890123456' '8:aaaaaaaa' test
Parsing: "[ 'hhl:1234567890123456' '8:aaaaaaaa' test\n" 
[{'test': ['aaaaaaaa', (12849, 13363, 3906085646303834169)]}]
>>>

As you can see this little shell example is taking your Stackish and converting it to a consistent Python data structure that matches it. You can also see that it takes the BLOB of ‘aaaaaaaa’ like you’d expect, but then it unpacks the other blob according to the ‘hhl’ struct pack statement. This gives you that tuple of numbers which is very handy for passing packed structures inside a parsed protocol.

Take a look at the examples/stackish.g file to get a feel for how it looks.

PyCon Baby

I’m going to be in Chicago from Thursday (14th) at around 9pm until Monday 7pm attending PyCon. Gonna bring my camera and my laptop and spend the whole time hacking and meeting people. I’m also trying to do some amateur anthropolog comparing the Python folks to the Ruby people. Should be tons of fun.

I reused my FooCamp login to create a PyCon2008 Crowdvine Account that will serve as my only social network that isn’t encrypted.

If you are going, then drop me a line and let me know if you want to meet up. I’m down with meeting most anyone, even the really crazy people. The crazy ones are the most fun.

But please, if you send me an email, don’t try to emulate my writing style. It’s really hard to pull off the creative “fuck” in an email, and when you guys try it you sound really absolutely crazy. I appreciate the attempt, but if you want me to reply, try to tone down the crazy just a bit.

Python Won’t Get You Laid

Ruby guys are under some delusion that Ruby got me more pussy than a pimp in a purple felt hat. I realized this when they kept saying, “Oh, Python guys are dorks and boring. Nobody will think that’s hot.” I was puzzled because, well, Ruby guys are a bunch of boring dorks hiding behind a wannabe rock star veneer. They bounce around under this illusion that they’re going to be the next huge startup by simple virtue of building their dumbfuck social network based on someone else’s shitty MVC framework.

But why would they care if some other group of coders are boring?

Then it hit me, they think Ruby is chock full of women and being a Ruby programmer can get you tail.

Oh man, I need to tell you guys something: Ruby didn’t get me jack shit, my skills and style did. Ruby didn’t do anything other than surround me with greedy dumbfucks looking to take my effort and flip it for a buyout by google. Ruby is lame and languishing with only its unjustified momentum keeping it going despite the shitty interpreter all your crap rests on.

If the Python guys are boring, then that’s just fucking awesome. So far, they’ve been a lot of fun to talk to online, even when they disagree with me. Not a single one has said “fuck you” at all. In Python “fuck you” is rare.

In Ruby land “fuck you” was known as “Tuesday”.