3 Feb 2004 chromatic   » (Master)

Things I Should Care About but Don't, part mauve:

I don't particularly care about data alignment in memory. I don't write a lot of C these days. (Two small programs tonight would belie that, except that my device driver writing roommate helped me with one, not coincidentally to discover the actual memory layout of a struct.)

Of course, writing the SDL bindings for Parrot (and, yes, Parrot exists and, yes, you can write actual programs in it: witness examples/parrot/anim_parrot_logo.imc which runs at 680+ fps on my laptop) means I ought to care about the SDL data structures.

It turns out that XS (the Perl 5 way of accessing C libraries) has an advantage over NCI (the Parrot way of accessing C libraries). XS can manipulate C data structures directly, while NCI needs to wrap them in appropriate Parroty access glue. Of course, since I'm writing PIR (a nice wrapper around Parrot assembly), everything's a little verbose, but trying to give named access to struct members can take a lot of work. (That doesn't mean that SDL_Event isn't icky, though.)

Add to that alignment issues of structs, and things can get rather complicated pretty quickly.

Fortunately, I persevered, at least in the limited case. There's very little standing in the way of writing an actual (though simple) game with Parrot now. Give me another couple of weeks.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!