depth first search

“We can only see a short distance ahead, but we can see plenty there that needs to be done."

Tag: python

My First SWIG Experience

A day of reading the SWIG manual and grokking the examples resulted in the following interface file. What does it do? It adds this to Python. %module blobs   %exception { try { $action } catch (…) { return NULL; } }     %include "exception.i"   %typemap(in) IplImage * (IplImage header){ void * vptr; [...]

New Algorithm!

I’ve added a new algorithm to my continuing series of Python implementations. A rather simple Metropolis-Hastings algorithm is ready for you perusal. All implementations in the series are now linked in the sidebar. Happy hacking! I’ve also updated the site license. You are now free to copy and share anything written by me on this [...]

On Python

I no longer choose to use Python. One day I decided to spend a couple of hours parallelizing some code for a new dual core machine. Than I discovered the GIL. From the Python list circa 2004: I’ve said it before. One day enough people will think that the GIL is a problem big enough [...]

Sage

I just watched an online presentation of SAGE, a nifty toolkit for doing mathematics. One of the really neat things about SAGE is that it glues together a ton of existing open source packages. We’re beginning to transition into the stage of software engineering where software development starts (in the minds of many futurists) to [...]

Note to Self

Python threads cannot run simultaneously. And forking two processes on a P4 with HT does not necessarily mean better performance. I don’t even want to attempt to unpack the existential reasons why I’m worrying about this kind of programming arcana in the middle of spring break. But today is beautiful, so I’m going for a [...]