Archive : programming

Hookbox @ NoVa Python Meetup

I made a few friends at the NoVa Python Meetup and incidentally gave an introduction to Hookbox. Here are the slides: Hookbox (PPT)

Rotating Arrays with Python

Consider the following snippet: 2!!7!4 Yes, that’s a valid expression from the proprietary K programming language [1]. From Wikipedia: Reading from right to left the first ! is modulo division that is performed on 7 and 4 resulting in 3. The next ! is enumeration and lists the integers less than 3, resulting in the [...]

Predicate logic plus message passing?

Right now I think it would be really nice to go back to the roots of Erlang and add Prolog-like predicate logic to the language, a kind of new mixture of predicate logic plus message passing. — Joe Armstrong, Creator of Erlang (link) Software frameworks come into existence when general purpose languages are adapted for [...]

Basic Intro To Ruby Meta Programming

My previous post about Python Meta Programming drew a fair bit of attention including one (that I know of) twitter troll that referred to Python’s model as ‘retarded’. Overreact much? Anyway, this prompted me to dive deeper into Ruby’s meta programming model to enlighten myself. One of the practical differences between Python and Ruby is [...]

Basic intro to Python Meta programming

A refrain I’ve often read on developer forums is that if one must ask about how to do meta-programming (in Python) then they probably shouldn’t attempt it. It’s true that meta-programming is an advanced concept and it can really warp your mind if you dive into it. So while most programmers may not need it, [...]

Ten Tips for Attending PyCon

At Pycon 2011 I met several people who were pycon newbies and in talking to them I realized that they weren’t sure how to get the most out of their trip. So here are a few simple tips that I wish I had known when I attended my first Pycon a few years ago: Plan: [...]

Beyond HTML5

Three interesting experiments are going on in the browser community which I would like to highlight: 1. Mozilla Audio API (available in Firefox 4) – A javascript API to access raw audio samples in the /audio/ tag. The API also supports injecting samples in the tag to synthesize audio. All in all, the demos are [...]

Sneak Peek: GAE Channel API

At Google IO 2010, the app engine team announced that they had a Channel API in the works. This week I got invited by Moishe Lettvin of the Channel API team to join a handful of developers to try it out. The api is undocumented at the moment and can be considered in private alpha. [...]

A Simple Experiment with Hookbox

Hookbox is a new Python-based comet server with support for Websockets. It’s main features include: Support for named channels on which data is published/subscribed. Server-side Websocket and WSGI support via the eventlet concurrent networking library. Client-side Websocket support via js.io. Fall-back to a custom comet protocol when websocket support is not available in the browser. [...]

State of Web Sockets

Image via Wikipedia I’ve been casually following the chatter on the hy-bi list about Web Sockets for the past few months. The specification has reached the final draft stages, but the list is still  a bee hive of rhetorical debates about several of the protocol’s features. The common thread between these debates is the complexity [...]