Tuesday, July 10, 2007

Rene talks about multithreading and multiple cpu's

Rene's talk is about how to use python with multiple cpu's. He has written a paper about it. The core libraries you use for game programming are already threaded. He has written a library to manage threads in games. The core idiom is "map", which in the context of threads becomes tmap.

Monday, July 09, 2007

py.test

I was a little late into this talk (took a nap in the break). An alternative to unittest, py.test, but it seams specifically geared to the needs of pypy.

ThenCad

I'm intriqued that somebody went and developed a whole CAD and released it as GPL, in pure python.

The gust of why ThanCad is better, is that it has some fancy features basically all other CAD apps lack, because it was easy for the guy who implemented them because, he built it open from the ground up. It's the lesson of simplicity really. It makes sense, because for instance in autocad, when you wanted to tag on some fancy features, you mostly can't because you don't have the code, and even if you did have the code, you can't because it's big and bloated.

The architecture seems pretty much an exercise in patterns (as in gemma et. all), but I suspect it works because it's bourne of practicality (rather then academic blindness to the real world).

On the downside, the choice of toolkit and technique leads to many problems and workarounds. While the speaker enumerates the problems met with doing it, ideas pop to my head of doing that in opengl, some small gui toolkit and greenlets.

It seems a highly interesting project, I'll definitly check it out

KSS, javascript with style

KSS is a client framework, so there's no intrinistic server side requirement. It looks interesting, it sort of encapsulates event handling and view changes into a domain specific language. I woner if it works outside a sandbox/wiki environment, with requirements on interaction.

It is an interesting thing, and it certainly is worth trying out.

Pylons

The pylons talk is pretty much what you can find out about pylons yourself. On an interesting note, supervisor2 received some praise in this talk, as a tool that can restart died apps, seems nice. The talk was about the development .

Pythonic interfaces?

This talk is about (the java understanding of) interfaces. The argument is that if you work with many many people on large scale projects, you basically need interfaces. I tend to agree, but I think large teams are a bad idea :)

So, the speaker also mentions that the other solutions out there (zope interfaces, py-protocols etc) are overly complex. Yes I agree, let's see...

Ah-ha, he uses decorators and inheritance to implement the functionality of an interface. And that seems to be it, mostly.

Well, I sort of like that the author tries to out of his way to make usage of it easy. The thing is contained in a single file. Speed seems to have been a focus, since it caches and optimizes for instanciation time.

Well, I don't know, it might be helping, it might be not, on any account there's no version up of it to date at http://www.mikeware.com/index.php

Sunday, July 08, 2007

mxTextTools

At the core mxTextTools is a state machine (tagging engine), written in C. The reason for introducing it was that in order to write a parser, you need a matcher (on a tokenizer and parser level). Writing matchers usually involves re, which is a pain in the butt. I like that it has a JIT compiler for the tagging commands. This seems to be a pretty powerfull replacment for the usual lexers/parsers.

Have a look at mxTextTools, it seems to be an interesting alternative to writing parsers using re/ebnf machines. I'm not sure it's really going to be easy to edit this list of assembly-like commands over a few bits of REs and a nicely written down ebnf.

easy extend

Easy extend seems to be about creating DSLs in python. It allows parsing from an ebnf grammar and can extend the python grammar for the language. You can download EasyExtend.

It compiles these defined languages to the python parse tree, this is then compiled to python bytecode by python. It can run multiple different languages within one python run, by a concept called fibres.

I don't know if it's really apealing, since it seems pretty much tied to the python runtime. For instance, can somebody tell me if I can create new syntax, for instance for a anonymous function? It seems like that's possible, the hard thing is changing not just syntax but changing semantics.

gearing up for europython

I've arrived at the hotel reva in vilnius, had some good nights sleep and I'm headed down for breakfast and registration. The hotel is nice, Thomas Waldmann (with whom I share a room) doesn't snore (sight of of relief).

so long, __doc__