Equality for Python
A few days ago in #chipy, the chat room for the Chicago Python Users Group, we had a chat about how Python determines equality. It’s a pretty neat and extensible technique, so I’m going to walk...
View ArticlePython Flyweights
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,...
View ArticleLambda at Work
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...
View ArticleStrings are a Domain-Specific Language
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...
View ArticleRipping Unicode at ChiPy
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...
View ArticleRipping Unicode
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...
View ArticleChiPy at Google
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...
View ArticleOne Laptop Per Chicago
ChiPy held our largest meeting yet at Google (again) last night, so here’s a linkriffic post about it. Feihong Hsu presented lessons learned on doing Unicode in Python. I love hearing real-world...
View ArticleAn Academic Inconvenience of Python
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...
View ArticleCaching Dictionaries in Python vs. Ruby
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...
View ArticleHave You Seen This Cache?
It looks like syntax highlighting, image thumbnails, and compiling object files. Let me explain. $ time vi -i NONE -u NONE app/models/god_object.rb -c ":quit" real 0m0.020s user 0m0.010s sys...
View Article