Posts

Showing posts from July, 2009

pyweek #9 - week games, not weak games.

Image
Pyweek is a game^H^H^H^H competition where you make a game in a week. You've probably heard of it(in which case ignore the rest of the words below, and above).

Some people call them sprints, other people call them jams, and other people call them battles, or game development competitions.

Pyweek is not really a battle, or Nerd-Jam® and not even really a competition, but a big-warm-hug of a week: making games with around 100 people from all over the world.

You get to throw off the shackles of your boring web development job, and be creative (kinda like fight club, but with zombies). There's so much energy during the week, with lots of feed back, ideas and screen shots flying this way and that. It's a bit intoxicating.

Individuals, and teams can take part. Some crazy people even take part in both a team, and do a solo entry.





Timetable

Friday 2009/07/31Registration openSunday 2009/08/23Theme voting commencesSunday 2009/08/30Challenge startSunday 2009/09/06Challenge end, judging…

python3 C API - simple slicing (sq_slice) gone.

Python3.x silently removed simple slicing support from the C API.

The problem is, python3 doesn't give you a warning it won't be used... it compiles fine... just your slicing tests will fail.

Since it's not documented anywhere, I will briefly mention a solution. Thanks to Campbell Barton for the idea.


You can reuse your old sq_slice function and create a new function in a PyMappingMethods. You can also reuse your sq_length in the MappingMethods directly with no changes.

http://docs.python.org/dev/py3k/c-api/typeobj.html#mapping-object-structures

mp_subscript is it's name.

Here is an example function from pygame.Color where it reuses _color_slice from the old simple slice function.
static PyObject * _color_subscript(PyColor* self, PyObject* item) {


#if PY_VERSION_HEX < 0x02050000
if (PyInt_Check(item)) {
Py_ssize_t i;
i = 0;
#else
if (PyIndex_Check(item)) {
Py_ssize_t i;
i = PyNumber_AsSsize_t(item, PyExc_IndexError);
#endif

if (i == …

Google OS.

Finally our overlords are giving us google chrome OS. I don't usually like to repeat google-pr, especially vapour^H^H^H^H^Hcloud-ware... but this is interesting.

http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html

Actually the article isn't interesting, except 'google are going to release another OS'. No technical details... and no comic book.

Not sure if it'll be anywhere near as good as the latest from Debian/Ubuntu, MS or Apple.

OS user interfaces are way ahead of anything google has made on the web... and game interfaces are way ahead of OS interfaces.

ps. this is the second OS google has released recently. android is the previous one (not yet hugely successful).