Building Boost/Python/Graph library

There’s a nice library called bgl-python which can be used to handle graph related problems in python using the, in my opinion, good quality code of the boost graph library. However, bgl-python does not seem to be maintained anymore, which is quite a pity.

Following one of the comments on this blog, I tried to get bgl-python to compile and I got everything compiling with boost-1.42.0, except for one file, astar_search.cpp, which fails with an error message of roughly 50k. Yes. One error: 50k of tekst, it’s got to be C++. The offending line, property_map.hpp:325 looks fine to me:


static_cast(pa)[k] = v;

The problem appears to be in the [k], which, for some case, is a void* instead of unsigned int. I can understand that’s a problem, but I’m currently at a loss why this is happening.

To be continued…

Update:

Nothing so far has worked, astar_search keeps getting the compile error. Any ideas are welcome!

Advertisements

Flexible keyboards

IMG_4194 IMG_4196

I’m a very happy user of the ‘old’ Sun Type 7 keyboard. Actually, I’m hoarding them, since, Oracle is going to kill the Sun hardware business and the Type 7 is one of those keyboards with all the keys in the right place. Control is left to ‘a’ and backspace is not in the top row, but one below, just above the ‘return’. In order words, I’m a sucker for keyboards and I’m really sensitive to their touch and feel and click and whatever there is to them.

Today I saw someone mysteriously put a silicone keyboard (it flappy and flexible, but no brand label to be seen) in my room and I had to try it. Actually, I’m trying to type on it for this blogentry. And, I’m not really a happy customer. Let me count the ways in which this board does not suck:

  • It’s very cool to fold away your keyboard when you’re not using it.
  • It has an uncounted number of shift keys. Well, there are four.
  • It’s featuring (sort of) in Die Hard IV.
  • It feels nostalgic.
  • You can spill stuff on it.
  • It fits in you backpack, or even the side pocket of your cargo pants.

Ok, that was the good stuff. Now for the less convenient stuff.

  • It stinks, as in, it has an awful plastic smell about it.
  • It stinks, because I’m actually trying to type less, because I’m prone to mistype on this thing a lot.
  • It gives me carpal tunnel syndrome with just using it for the past half hour.
  • It is very wobbly, even when I put it on a sturdy surface area.
  • Did I mention it has four shift keys? And two space keys, but you can still touch them without any reaction? It even has keys on them without any label at all.
  • It has windows keys on it, but more keyboards do, so I will not hold it against it.
  • It doesn’t have a brand label on it, so it must be crap. Otherwise, someone would put a label on it to say that they’re responsible for it. Probably they’re quite scared of someone suing them into oblivion.
  • The control key is broken.

So that’s it. Unless you want to look really cool and like you’re in Die Hard 4, get it. Otherwise, give your wrists and hands and the rest of your body some rest and stay away from it.

Coolness: 7/10 (hey, it’s in Die Hard Four) (but it does not glow in the dark)
Function: 3/10 (with working control: 4/10)
Weight: 8/10 (it’s very light)
Space: 10/10 (it takes up almost no space in your backpack. That’s good).
Total: 5/10. If function is not good, forget it.

Ruby documentation

I’ve been using Ruby for some small projects for a couple of weeks now. So far, there are worse languages in the world (Perl JUMPS to mind). I’ve used Python for a long time (10+ years, at least). It’s a language to love, but, people are all raving about Ruby (on Rails) therefore I gave it a go.

Verdict so far

  • Language OK
  • Documentation SUCK

However, I’m not the only one. Fundamentally, Ruby can be used to create applications quite easily. However, if the documentation is hard to find or non-existant that purpose fails. I find myself looking at the implementation of ruby classes far more often than I’d expected, because the documentation is so thin. It surely cooled my appetite.