Only show posts tagged with: metablogging, english, sotramont, francais, linux, ubuntu, geeky, web, python, django, screwtheman, spam sucks, vélo, akoha, hiring, chicago, pycon, cloud, consulting, quacks
Older posts:
This fourth day at PyCon 2008, the third and last day of actual talks, was quite good. Updates on the OLPC, on python in Mozilla, and another keynote on creating and distributing python applications, and talks about python internals, then TurboGear wrapped up the talks.
The first keynote, " Making Client-Side Python Suck Less", was again quite interesting. He spent a lot of time describing the basic problem: if you make a largish piece of software with python, especially one with a GUI, which is supposed to run on people's computers, especially windows, but also Mac, you'll have a hard time getting my mom to use it. That's because your software needs to have installed, at the very least, a recent python distribution, and a GUI layer such as wxWidgets. My mom won't do that. So your second option is to package the whole thing up into an installer: python, your app, and all of its dependencies. Of course, what you end up with is a huge package containing mostly dependencies, not your actual code. Install 2 other apps like this one, and suddenly you've got 3 different, independent python distributions on your computer, and you're eating 500MB of RAM just to start the 3 of them up. This is ridiculous.
So the idea here is to make this work on-demand. Your installer would only contain this minimalist "on-demand installer", and your software per se. If the installer sees that you don't have the dependencies, it will install them properly, system-wide. So the installer for the second piece of software will see that python is already there, and will only download and install the additional dependencies which the first did not require. I can think of many wrenches that will likely fly into this machinery, but none are impossible to address. This is very interesting, because i'd really like to see this problem solved in the near future. Of course, the basic reason this problem exists is quite simple: after 23 years (!) of developing Windows, Microsoft has still not given the faintest clue that it's even thinking about solving the software packaging problem. Apple isn't particularly great, but at least they had the idea of a software package that is a directory and wouldn't have to venture away from that dir. But that doesn't address dependencies, and many pieces of software still need to install components outside of it.
Okay, this is not completely fair to Microsoft: there is an 'uninstall' feature, but overall the whole thing still sucks. Compare this to debian packaging and you'll understand how on Ubuntu, packaging and installing an app which requires a dozen different other libraries, even specific versions of them, is easy.
Next, Ivan Krsti? was supposed to give us an OLPC Update, but an hour before the talk, his laptop had a breakdown, and he was still busy re-typing it in. So Mark Hammond talked about the past, present and future of Python and Mozilla. Many golden tidbits of information in this longish talk. The main takeaway is that python is the only language other than javascript and its variants being worked on for including in Mozilla. Not for scripting web pages with python, unfortunately, as sandboxing isn't currently possible in python, but for writing XUL applications (and therefore also for writing Mozilla / Firefox / Thunderbird extensions).
By now, Ivan Krsti? had typed the main talking points back into another laptop. He presented the current state of the OLPC. His description of the first 2 deployments, in Uruguay and in Peru, showed that OLPC is finally, actually into the hands of thousands of children. He got a lot of good feedback from that, which can be incorporated into the next builds of the software. He described the hardware status as very good, but the software, while being stable, has lots of rough edges. That's probably because there's people like me who got a development laptop, aren't contributing nearly as they wanted to... (sorry!).
After this, Jim Baker talked
about python iterators
and generators.
This was very interesting,
and was actually the only talk that made me see some code and think "hum, i've got to look this
up" because i didn't know about it, such as
tee, or because
i know about them but haven't really thought about using them in a smart way, such as
iterators and
generators. He also went into some
jython-specific ways of using those constructs. Also in this talk, i think, was a mention
of something i didn't know of: named tuples. I have no link to give you, despite some googling,
but basically it lets you create names for positions in a list. So a point in space
could be stored as a list of 3 numbers, x in point[0], y in
point[1] and z in point[2]. This comes up a lot, because
although it would be possible to use a dictionary for this (point['x']) it wouldn't
be a very good idea, performance-wise. Named tuples will let you go point.x, which
will be the same as point[0].
An under the hood look
at core python containers was also a great idea for a talk. Raymond D Hettinger gave us
many bits of information about how memory is allocated and used in cpython's implementations
of lists,
dictionaries
and sets. The lessons here are
that smarter people than me have looked at this and mostly solved it, and that if you know your
list will be huge, pre-allocate it, such as by going [None]*long(1e6). Also,
that Sets are super-efficient, and if you're not using them, you really should.
That was it for the PyCon 2008 scheduled talks: at lunch it was all over. The afternoon was devoted to lightning talks (like SNPedia which was quite cool). Following that, an introduction to the sprints which will take place monday through thursday, and individual sessions for the specific sprints. There are a lot of sprints - 22 -, and LOTS of people showed up for the sprint tutorial. It's great to see people getting involved like that.
Jacob had a nice session for the django sprint. He gave a summary of the django guide to contributing, he also did a little intro to the Django internals, and talked about what remains to be done on the way to a 1.0 release: they need to finish up and merge the ###newforms-admin branch, the queryset-refactor branch, and a few other things. He does think that the queryset-refactor branch will be merged into trunk by the end of the week, however, which is great news.
I then crashed early... a fever kept me awake most of the night... i think i caught a flu :(
by wiswaud
on 17 March 2008
Tags:
django, english, geeky, python