Simple Socket.IO Chat Room Creator

So, yeah, I guess there's something to all this Node.JS hype. :)

I've been toying around with different modules (express, zeromq, socket.io) for a side project idea, and I have to say it's been a lot of fun. CoffeeScript + Node.JS is even better. I think Python may be getting a bit jealous. (I still love you Tornado. :))

Anyway, I decided to throw the goofy chat room creator (like EVERY OTHER Socket.IO "experiment") up on a server and github. (It's not in CoffeeScript though.)

<friends>It's UBERCHAT -- It's new, it's (not) German, it's extra tough!</friends>

(download)

Really basic, supports room creation with random id room URLs, simple private messaging, away / active, etc. Also supports crashing, I'm sure. There's no persistence or anything clever yet, so if the one instance of Node goes, so do all the rooms. :) Gogo redis... later.

Best Poboys in Austin

(download)

I usually post about Python and dev stuff, but I figured I'd share my new food obsession.

At 3rd and Congress, there's a trailer called Turf n Surf that serves fantastic poboys. My personal favorite is the Kiss yo Mama, which has bacon wrapped grilled shrimp, fresh slaw, and loads of awesome.

Anyway, if you are in the area, check em out.

Espresso Vim Plugin

Totally forgot to post this a few days ago when I put it up on Github. I wrote a quick little CoffeeScript –> minified Javascript compiler plugin for vim the other day, out of total laziness. It uses the CoffeeScript syntax library from the original CoffeeScript vim project. I call it Espresso because I think I’m clever.

You’ll need to have CoffeeScript and JSMin available in the path, and I’ve only tested it in Linux, so let me know if it explodes on you.

Introduction to Tornado

So I did an introduction to Tornado talk at the recent Austin Web Python Users' Group (or AWPUG as it is better known). It was a lot more fun for me than I bet it was for those who had to hear me yammer on. Thankfully, Travis Swicegood followed with an excellent talk on Class-based views in Django 1.3.

Someone had a Flip video camera going, so the intarweb may soon be blasted with my incomprehensible jabbering.

Anyway, here are the slides from my talk:

Also, I made a fake site for people to see how one might construct an async API-dependent website in Tornado pretty quickly. It depends on Torn, a project a few of us are working on which shamelessly apes a subset of django-admin.py, just for Tornado sites.

As an aside, someone asked me a question about why you would pick Tornado over gevent, when gevent will let you use any WSGI framework on top of magically asynchronous sockets. I mumbled something about "explicit versus implicit" and the Zen of Python, but in retrospect I totally bombed that question.

While the explicit nature of Tornado IS awesome, as is the performance of epoll, etc., Tornado is genius in the fact that it somehow manages to provide very low-level, simple access to all parts of the HTTP request-response cycle and yet simultaneously includes most helpers you might need for building a slick web application. By overwriting a few methods, I can create a custom authentication system in a few lines, using whatever data backend I choose.

You can do the same with Django, but the difference is that Django's shortcuts tend to make you follow Django conventions. Tornado provides the tools to easily create your own. Tie that in with slick async single-sign-on libraries for Twitter, Facebook, Google, OAuth, etc. and that's just one simple example of one of Tornado's many benefits. Personally, I just tend to work faster in Tornado, with more flexibility.

Anyway, that's what I should have said. :)

Laziness FTW

So, I'm horrible at maintaining a blog. I'm going to be oblivious to my own weaknesses and assume it's because managing my own Wordpress installation is just too time consuming (or some other equally inaccurate reason I'm too lazy to post), and I've ported all my stuff to Posterous now. I can just email a post now, so surely I'll be more proactive, right?

...yeah...

Anyway, my massive library of something like ten posts have been imported here, and all the code formatting, etc. has disappeared. Let's see how long I go before forgetting to update for another year and a half...