Archive for the ‘programming’ Category

Tag chooser as an ML project

Thursday, May 1st, 2008

I think that would be cool: machine learning is used to tag stuff, that is to classify things. How about learning classes? it does that too. So it doesn’t seem to be too out of the way for someone to create a system that suggests tags for a blog, given a bunch of examples (i.e. existing posts, other people’s posts and tags). Anybody know of an existing one?

Hardware is the root of all evil

Tuesday, December 25th, 2007

Well, that’s almost the title of Herb Sutter’s talk, called “Machine Architecture: Things Your Programming Language Never Told You”, slides and google talk available:

If you do nothing else, go to 1:53:30 in the video (about 3 minutes before the end) and listen to the pledge. It’s cute. It’s backed up by the rest of the talk.


Monday, October 15th, 2007

This showes my python based geometry server and algorithms. It is basically a implementation of computing a 2d celldecomposition (arrangement), and the display is done using pygtk and opengl, and twisted for the networking, a better combination then wx+twisted (I no longer have any timeouts, nor do I have to move the mouse to force processing of network events, and ctrl-c actually works). Other then that, like always, the code is not very good, but it works. The right showes the current bug being investigated – the shape on the left is symmetric, and the resulting graph on the right should be too, but it isn’t. Probably more numerical inaccuracies (lines that should be parallel but are not, etc.).

NShape Visibility Bug


Tuesday, October 2nd, 2007

Should I develop on Xorg? I’m thinking this is a good idea for several reasons:

* I lack a pet c++ project (or c project for that matter). I’m doing python all day, and I’m losing c++/c.

* I have some pet peeves. The most annoying is problems with my new laptop’s intel driver. I specifically set out to get a laptop with OSS drivers, and got one (for video at least), and now they suck! I get hangs when running qemu, some games don’t have iDTS (spring RTS). And another thing is Xephyr, which I’d like to improve in a small manner.

The con is of course that Xorg is a motherfuckingly huge project, with autoconf etc. At least it is modularaized.

And then again I have three dual core machines that should be seeing some action some way..

Will see.

Citations Ahead

Thursday, September 20th, 2007

Let’s get this out of the system. I’ve spent the last day doing this:

  1. learning to script dia with python
  2. finding a script for searching with googlescholar from python
  3. adapting it to get the citations for the first found document, assuming a search for the full title will always lead to the document with that title being first (seems reasonable).
  4. fixing the bugs and getting the picture below.

To get it running I did the following (there is probably a much simpler way):

  1. got the from dia sources (apt-get source dia-libs)
  2. copied it to ~/src/dia_python
  3. put there the files attached (,,,
  4. export DIA_PYTHON_PATH=~/src/dia_python
  5. dia

The result is that dia has an extra menu entry in the Objects menu. It expects you to have selected a “Flowchart – doc” type (see the attached dia file), and then goes and expands it through google scholar, putting new nodes. Due to a bug/lack of understanding on my part, you have to refresh the display somehow, by dragging around, to actually see the new nodes.

Missing: identifying same objects instead of creating them again, citations by, clickable links so you can easily go to the web, export to bib file / aigaion, go wild.

Since I can’t actually upload any of the non image files (dia, py) I’ll put them here

citation generation

raindrops keep falling on my head

Monday, June 25th, 2007

The blog. I haven’t really considered the implications of this, but since this is a prewritten first entry, I probably never will.

Why am I writing this? I’ve been using a wiki for more then a year, and despite it being a very good place to store junk, it is not so good at linearizing thought. So using a real blog, will it have any better results? I’m not sure. But it has so much fewer points of entry, that may be a boon.

If I want anyone to actually read it it better contain some useful information.

I’m calling this “raindrops keep falling on my head” since I couldn’t find anything containing “webdrops” or “googledrops” or whatever, but you get the gist.

Of todays drops:
* rasterman – the man behind e17. He’s 28, like me!
* sage – first it is a web accessible python interpreter, so that’s something off the todo list, but other then that it is a very nice CAS. I’m trying to get it to do voronoi diagrams (but first I need a working python based implementation, or wrapping an existing c one, like fortune’s or Tess).
* TexMacs – this too has a python plugin which makes it very nice as well.

Plotting with TexMacs looks like this:
from math import pi
from pyx import *

basically just like plotting with pyx, but you use ps_out.

with sage:
g=sum(sum([[line([m[i],m[j]]) for i in xrange(j+1,len(m))] for j in xrange(0,len(m)-1)],[]))