Older blog entries for follower (starting at number 90)

BarCamp Christchurch links

While I think of it, here are some links to items I mentioned during my hardware/gadgets spiel:

Contact me for more information if I've forgotten anything...

Syndicated 2007-09-07 11:30:00 from follower

BarCamp Christchurch

Today I'm at BarCamp Christchurch. Great turn-out I think—about 30-40 people at various stages. Very cool to see an event like this in Christchurch.

Thanks Seth and Ben.

Syndicated 2007-09-07 04:30:00 from follower

A winning streak

I seem to be on a bit of a winning streak lately...

  • A couple of weeks back I won tickets to the Christchurch preview of The Simpsons Movie. A chorus of "Spider-pig" has been heard around the house by various singers since...
  • Then last week I entered a "Name the Thing Contest" contest on the Hacked Gadgets - DIY Tech Blog and won a Aryca D-pod mini camera tripod like this. The D-pod gets a good user review:
    ...little tripod - an aryca, very lightweight and strong. It is actually an extremely well designed bit of kit and folds flat into 15x5x1.5cm, so that it is easy to carry in ones pocket. Again I find it extremely useful...
    I've recently acquired a Black and White parallel port QuickCam without a base so until it gets absorbed by a project the D-pod can serve as a base.
  • And then of course there's this Saturday... :-)

Syndicated 2007-07-31 09:40:00 from follower

pwyky wiki

Like many hackerly-inclined individuals I tend to develop or research a lot more stuff than I release or comment on. The reasons for non-release vary but generally relate to the non-trivial amount of work it takes to put even a half-baked idea on a webpage or blog entry. (A workload increased by the accompanying handy case of perfection-itis.)

The amount of work required to document something depends significantly on the tools at hand so in light of that I've installed a version of the pwyky python wiki on code.rancidbacon.com. The version I'm running is actually a cosmetically modified version of a modified pwyky version hacked by a guy I ran into during my Google Maps hacking escapades. There's some notes on the modified pwyky version and they include some Apache configuration suggestions also.

I'm treating the site as a "one-way wiki"--it's intended to make it easy for me to update it, not in order foster community additions. Various obvious reasons apply.

The updated site will include project documentation and general link-storage--I guess a local del.icio.us replacement--in an attempt to reduce my browser-tabbage when I'm exploring half a dozen paths at once. While much of the wiki is intended purely for my use I made it public on the off-chance it ends up being useful for anyone else.

With some use of mod_rewrite I think I even managed to preserve the existing URLs on the site.

"Oh, I'll chuck it in the wiki" will hopefully help with my information processing activities... :-)

Syndicated 2007-07-26 14:05:00 from follower

It's here... OLPC/XO-1 etc

You might have guessed my silence over the past couple of days was either:

  1. completely normal due to the usual reasons for my erratic posting schedule; or,
  2. due to the OLPC/XO-1 laptop prototype finally arriving.
Here's a clue:

XO-1 self-portrait

As to the reports I took a trip to the courier's airport depot just so I didn't have to wait an extra day to receive the laptop... Well, what do you think?!

OLPC at TVIC

I managed to get the laptop upgraded to the latest firmware and system build just in time to take it for a show-and-tell at our monthly The Valley in Christchurch dinner. This display of geek-dom resulted in a small video recording demo starring Marek, Paul and myself (signed model releases not available).

Syndicated 2007-04-12 14:05:00 from follower

The Valley In Christchurch April dinner, tonight!

A reminder that if you're in Christchurch, New Zealand, you should attend tonight's dinner meeting of The Valley in Christchurch.

OLPC

If it gets delivered in time and I get it set up ok I'll see about bringing the (hopefully) newly arrived OLPC to tonight's dinner...

Syndicated 2007-04-09 23:30:00 from follower

Like Christmas at Easter

Late last week I received an email saying:

Please send us your complete address and phone number so we can send you a 
XO B2 machine.
If I said I hadn't been repeatedly refreshing the package tracker page ever since i'd be lying. :-) Unfortunately while I know the package left Auckland late this morning I won't be getting it until tomorrow at the earliest as today is a public holiday. :-(

Now I just have to come up with something to do with the OLPC laptop to make their investment in sending me one worthwhile:

(The delivery is the result of a submission I made at linux.conf.au in January where Jim Gettys invited people to email development ideas for a chance to get a OLPC laptop to develop on.)

But remember: "It's an education project, not a laptop project."—Nicholas Negroponte

Syndicated 2007-04-09 02:40:00 from follower

Flash, ming, Python and ctypes...

You didn't think I was going to leave you without a dope beat to step to... I mean, having to use ming from C, did you? Of course not, I wouldn't be so cruel...

So, ming has a Python binding available as a separate download or from CVS but it's based on SWIG and not exactly actively maintained (for example no SWFVideoStream support). In fact, I did try to bring the SWIG binding up to date but it wasn't even clear what parameters were used to produce it in the first case...

Since any potential speed benefit from having a compiled C extension is probably not a major factor for ming and because I've had experience with ctypes before I decided I'd try using ctypes to create a Python binding for ming.

The cool thing about ctypes is that in the simplest cases once you've compiled the target library in the usual way you're ready to go. In addition, it's relatively straightforward to convert a chunk of C to the equivalent Python—it won't be pretty or Pythonic but will probably be functional.

A basic example

By way of a simple example based on test/Movie/new/test01.c: (Note: Change library name as appropriate.)

#!/usr/bin/python
#
# Requires `libming.0.4.0.dylib` in the current directory
# or in the search path.
#
from ctypes import *

libming = cdll.load("libming.0.4.0.dylib")

if __name__ == "__main__":
    
    if libming.Ming_init() != 0:
        raise Exception("Ming_init failed.");
    
    movie = libming.newSWFMovie();
    
    bytesout = libming.SWFMovie_save(movie, "test01.swf");

    print "Bytes written:", bytesout            
The result will be a valid, but boring .swf file.

More complicated stuff

Once we get much deeper into ming usage we start needing to do things like casting values and it gets somewhat unpleasant. Fortunately, there's a way of making that easier too—my intention is to return to that topic in a later post.

Syndicated 2007-03-28 18:10:00 from follower

Compile ming Flash generation library on OS X (ming 0.4.0 beta 4)

libming is "a library for generating Macromedia Flash files (.swf), written in C". As of the current beta (0.4.0.beta4) it does not compile out of the box for me (OS X 10.4 PPC) so I thought I'd write up what worked for me.

For future reference, when trying to compile out of the box the following error occurs when trying to generate libming.0.4.0.dylib:

ld: Undefined symbols:
_yylex
/usr/bin/libtool: internal link edit command failed
The problem seems to occur when linking against libfl, I'm not entirely clear why it happens but if you remove the library from the link process the problem "goes away"—seemingly with no ill effects—the small patch below implements this work around.

How to compile

It seems I had the necessary dependencies (such as libpng) already installed but if you don't you might want to follow the existing ming OS X installation instructions for that.

Okay, here's what you need to do:

wget http://dl.sourceforge.net/sourceforge/ming/ming-0.4.0.beta4.tar.bz2
tar xjvf ming-0.4.0.beta4.tar.bz2
cd ming-0.4.0.beta4
Now we need to apply our patch osx_ming_0.4.0.b4.patch to workaround the error:
wget http://words.rancidbacon.com/static/osx_ming_0.4.0.b4.patch
patch 
Then continue:
./configure
We then need to work around a permissions isssue:
chmod u+x config/install-sh
Finally, we get on with:
make
And that should be it...

You can install the library now or run a quick test:

cd test/Movie/new/
make test01
./test01
../../../util/listswf test01.swf | diff -u test01.ref -
The last command should result in no output—if there are any differences things didn't go as planned...

Hopefully things did go as planned however and you can now start playing with ming on OS X...

The future

I've been working with the ming people on #gnash and hopefully the fixes will be included before the next release. It appears this can be applied to the version in CVS to fix the flex library issue in the proper place:

--- configure.in~       2007-02-22 07:32:11.000000000 +1300
+++ configure.in        2007-03-29 04:33:23.000000000 +1200
@@ -198,7 +198,6 @@
 dnl --------------------------------------------
 
 AC_PROG_YACC
-AM_PROG_LEX
 AC_PROG_LIBTOOL
 if test x"$LIBTOOL" = x; then
        AC_MSG_ERROR([could not detect libtool, bailing out])

Syndicated 2007-03-28 17:35:00 from follower

81 older 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!