What Day Is It?

Dating back approximately my return from PyCon, I have been having trouble sleeping. It's not every night, and it's not just tossing and turning. It's more like my brain never makes the transition from waking state to sleeping state. I'm not sure if that distinction is clear; it's sure clear when I'm lying there staring at the ceiling.

The accompanying fatigue has been sufficient to suppress my urge to update my journal, hence the dearth of new entries. There are a few things percolating, though. While those are developing, though, here are some links of interest for the week.

Fri, 16 Mar 2007 23:53


Drinking from a Firehose, Listening to a Drum

I've been trying to keep up with the stuff being thown at me, post regular entries, but glancing in my Notes directory reveals a lot in raw brain dump format waiting to be translated into a more formal structure.

This has been exciting becuase it's a chance to spend three days thinking about little more than better ways to do things. Besides my Notes directory, my Ideas directory has seen the most activity. I'll be getting this all posted as soon as possible.

Last night, Mom, Dean, and I attended a performance of Kodo, the pre-eminent taiko group from Japan, at the McFarlin Auditorium on the SMU campus. If I write about it, I will certainly be accused of exaggerating, becuase of my overuse of superlatives. It was fantastic. Contrasting this performance with performances I have seen in the past, elements of humor, subtle and not-so-subtle, were woven throughout the thundering tapestry of sound.

Sun, 25 Feb 2007 09:18


Thoughts on OLPC

I've never been a huge believer in the One Laptop Per Child project, the subject of Friday morning's opening plenary. I'm one of those people who says, These kids need food first. Clean water. The talk Friday about OLPC made some inroads, though; I don't know if it was intentional or not, but it appeal to the part of me that believes the nerd rapture. Ivan Krstic seemed to be suggesting that by providing sturdy, hackable machines, which provide access to the virtually limitless resources of the internet, children will learn to teach themselves important skills and knowledge.

I'm being idealistic, here, but there's a significant note of cycnicism, too. Sturgeon's Law applies to the internet just like everything else. Internet access isn't a magic bullet.

In some ways, OLPC resembles a Young Lady's Illustrated Primer. Its collaborative. Its self guided. It encourages exploration.

It's also like the space program in that it has produced technological innovations that will, I hope, be of benefit to the community outside the target of the initiative. The batteries for example, are lightweight with long lifetimes. The screen has a very high resolution greyscale mode, as well as a medium (greater than 800x600) color mode. The greyscale mode is intended to support ebooks, and the machine internally disables update for the rendering of static images (like pages) for power saving purposes. Both these features would be beneficial for my laptop today. *glances at power meter*

Particularly exciting for the Python community was the discussion of the software run by the OLPC XO, the designation of the current revision. The OS is based on Fedora. (Why this is, I don't know. It seems likely that its heavily enough modified that they might as well roll their own.) On top of this, and this is the exciting part, is a suite of largely userspace system services and applications written in python. Python was chosen because a key feature of the system is editability of the source code; an interpreted language is an obvious choice. Python was chosen for its cleanness and simplicity. Unfortunately, for all the niceness of python, they have had performance issues with it (which is why you don't see many OSes written in python in the first place). They have made some platform specific optimizations that realized a 100% speedup, which puts them in the ballpark.

Unfortunately, this seems to be an advance that won't be portable to other platforms; I guess it's pretty low level hardware stuff.

Users, that is, kids, drop into source editing mode by a single keypress: the "gear" key.

The technicalities of what happens when the system software breaks and the machine becomes unusable was not discussed. One presumes this contingency has been thought about; Maybe the system is compressed into a corner of mass storage, and can be uncompressed when the user presses the proverbial Big Red Button.

The talk was galvanizing and exciting; the room full of python nerds were all agog, thinking of a world that runs on python because of a billion children all growing up with computers that encourage them to hack in it. Again, I'm being a bit cyncial—I also think everyone believed changing the lives of all those children for the better, increasing literacy, decreasing hunger and poverty are all goals worthy of striving for.

While, as mentioned above, the ideas behind OLPC seem similar to those from Diamond Age with the exception that it's intended for the economically disadvantaged, rather than advantaged. Also excepted, by omission, was the curricular component that was key to the success of the Illustrated Primer. It's unclear with the XO, how children will be lead to information. The Illustrated Primer supposed a game-like interface wherein self-training behaviors were encouraged and reinforced, with increasing complexity and intelligence finally culminating with the inclusion of third party human agents in the process, even if the direction of inquiry was under some control by the user. There was still the authority directing the underlying learning experience.

This aspect was left entirely as an exercise for the reader. There was much about the system software, a little about applications, and nothing about curriculum. Maybe this is by design. If it is, it seems like a mistake. We are evolutionarily geared to emulate our elders, learning the things we need to know from them. It seems like there needs to be some kind of instructional framework, otherwise we are asking these kids to start from first principles, teach themselves to program, and then to change the world. Seems a little farfetched, even to me, paradigm shifts and singularities notwithstanding.

Sat, 24 Feb 2007 15:01


Stackless Python, Lunchtime Lightning, Dev Panel

After SWIG, I just stayed put for a talk on stackless python. I knew nothing about stackless before the talk, and I only know a little more now. I'm still digesting the ideas; it's exciting.

Over lunch, conference sponsors gave lightning talks, five minute mini-sessions packing loads of information into a little time (with the overhanging threat of the mic being cut off when the timer reaches 0:00). We heard interesting things about scientific programming (SciPy) and development tools (bazaar, komodo), but the room was electrified by the CCP Games talk. EVE Online is built on a python (stackless!) infrastructure. The demo they showed, though prerendered, earned the only ovation offered during the lightning talks.

I'm now listening to the python dev panel, and the biggest discussion is about how python can be made to take advantage of multiple cores. The global interpreter lock makes this hard, and the limitations are not unique to python. The panel seemed to have the consensus that python that can move away from the GIL will be something other than CPython, maybe PyPy. (The panelists are CPython developers.) Argh, the pypy talk is going on opposite this one.

Question: What about bloat? (This was prompted by the keynote, which I'll write about later.)

One panelist (Andrew?) lamented that the language is changing, with new features being added, leading inevitably to larger size. He wishes that they could "quit monkeying with the language" and work instead on the standard library. (Is python finished? I wondered this in 2003, when list comprehensions were new. I mean, they're keen, but... I wonder if this is the attraction of LISP. Its been done a while, ARC notwithstanding.)

Speaking of core bloat, question: What needs to happen to get numeric stuff, like the array interface into the core? The numeric community needs to take the lead, submit patches, etc. Incremental changes are good, easier to review than large sweeping changes. Start as a library, popular, stable, that can be included in the "batteries included" distribution.

Question: What's the process to get a package accepted into the standard library? Step 1: Write it. Don't ask if you should write it, just write it. Get it accepted by the community. Follow the coding standards. Be ready to be the maintainer. It must be a general solution that is useful to the community at large. Documentation and tests must also be included.

Question: There's no mechanism for unloading a C extension. Should there be? There's not much call. There's no way to know of the extension is actually unused.

Question: Standard library vs. eggs. Setup tools will support eggs in 2.6. Should eggs replace large swaths of the standard library modules? Mmmmaybe.

Fri, 23 Feb 2007 14:32


PyCon 2007 Live Blog: Swig Talk

Presented by Monty Taylor of MySQL.

Comparing other solutions, he only really talked about Boost.python. He doesn't like the huge ugly error messages.

Swig, he claims, is no longer slow, hard, or just for perl. It does make a lot of code, which can be interesting to look at.

%module simple
%include "simple.h"
#include "simple.h"

setuptools is Swig aware. That's kind of cool.

C Sucks. ...because of error checking requirements. Maybe so, but it doesn't become less complicated at the boundaries between C++ and python. Swig doen't make things easier here.

Swig allows extension of classes (monkeypatching).

class C {
    class Inner {};

Cons: Swig doesn't handle inner classes at all. Overloaded methods are pretty awkward, going from Python back to C++.

typemaps: powerful; need their own talk.

Ran into Shane Geiger. I guess he's living in Austin now.

Swig docs swig python very complete.

Fri, 23 Feb 2007 11:59


 Page   of 53