Have You Seen This Cache?
Code: , , , , ,
2 comments

It looks like syntax highlighting, image thumbnails, and compiling object files. Let me explain.

Continue this post

Caching Dictionaries in Python vs. Ruby
Code: , , ,
8 comments

A while ago I made a slightly-underinformed post (see the corrections in the comments) trying to draw a difference between Python and Ruby. I’ve finally got a decent example and can explain what I’m getting at.

Continue this post

An Academic Inconvenience of Python
Code:
13 comments

Sometimes Python’s roots in academia bug me. Lots of functions have a computer science feel instead of a software development feel. Here’s an example I just ran into: I wanted to fit as many sentences as possible from a long text into 255 characters. So I wrote:

Continue this post

One Laptop Per Chicago
Code: , , , , , ,
1 comment

ChiPy held our largest meeting yet at Google (again) last night, so here’s a linkriffic post about it.

Continue this post

ChiPy at Google
Code: , , , , , , ,
6 comments

I had a great time last night at the ChiPy meeting last night that was held at Google’s Chicago office. I suspect a lot of people turned up just to see the venue: usually ChiPy gets 15-20 people but we got 51 last night.

Continue this post

Ripping Unicode
Code: , ,
3 comments

some unicode glyphs I love shoving around large amounts of data. Unicode is an industry standard for encoding data in most every written script there’s ever been. It has over 97,000 characters. A while ago I read about a guy who made his own Unicode poster and I realized I had an opportunity for a fun project. I think Unicode is an invaluable and beautiful project, and this is my tribute to it.

Continue this post

Ripping Unicode at ChiPy
Code: , ,
1 comment

Last night at the June 2006 ChiPy meeting I gave a presentation on how I wrote a few small Python scripts to take apart the Unicode PDF of all its glyphs and recombine them into giant ascii-art-like posters.

Continue this post

Strings are a Domain-Specific Language
Code: , , , ,
No comments

Question: Isn’t a domain-specific language just the same thing as a library?

Source: Pretty much everyone the first time they hear of DSLs.

Answer: No, a DSL is much more than a library, and I have an example that won’t make you say, “Well, sure, if you’re doing something that esoteric…”

Continue this post

Lambda at Work
Code:
3 comments

Lambda Finally, several years after learning lambda expressions, I got a chance to use one at work a few days ago. As long as I’m putting a notch in my nerd belt, I’d like to write about what lambda is and how it can be useful.

Continue this post

Python Flyweights
Code:
6 comments

When I wrote Equality for Python, my example didn’t mention how the Card objects could actually be a terrific waste of memory. A commenter named versimilidude (great handle!) beat me to this post, briefly describing the Flyweight Pattern. Luckily he didn’t provide example code, so I still get to publish this post.

Continue this post