domingo, 28 de agosto de 2005

Cool python tricks!

Hey all!

I've been messing around python and pygtk lately. I've managed to code a simple class that implements Tomboy's key grabbing functionality that allows you to simply type '<alt>f11' anywhere on your screen and open a new note.

I am proud to say it's quite simple to use it, simply pass a string as in GTK's accelerator_parse function (like '<ctrl><alt>f11') and a function.


binder = ExternalKeyBinder()

binding = binder.bind("<alt>F8", printer)
gtk.threads_init()
gtk.main()


Since I use a different thread to listen for the Xlib key press event, I have to call that strange gtk.threads_init() function.

This code depends on python-xlib and pygtk (for doing the string parsing thingy). Oh! And that class is a GObject.

It is not a finished work (that are some details about keymap modifiers that I have to review and no documentations yet :) ), but you can get it here.

sábado, 20 de agosto de 2005

Time

There is something truely fascinating about this little flash animation. I think it shows a primordial flaw in the design of clocks: they shouldn't be made circular. By making it so, we lose a precious notion of the speed that time sleeps away from us. Also, since it's interface is periodic, we are tempted to think we may regain the time lost the next time the little pointers cross this point again tomorrow, of the day after that.

domingo, 26 de junho de 2005

Revolutionary opinions...

... start with simple thoughts. Check out this article:

The Worst Mistake in the History of the Human Race

The simple thought?

To science we owe dramatic changes in our smug self-image. Astronomy taught us that our earth isn’t the center of the universe but merely one of billions of heavenly bodies. From biology we learned that we weren’t specially created by God but evolved along with millions of other species. Now archaeology is demolishing another sacred belief: that human history over the past million years has been a long tale of progress. In particular, recent discoveries suggest that the adoption of agriculture, supposedly our most decisive step toward a better life, was in many ways a catastrophe from which we have never recovered. With agriculture came the gross social and sexual inequality, the disease and despotism, that curse our existence.


sexta-feira, 24 de junho de 2005

Some cool things I found this Sunday



  • Sudoku: a very addictive little game. No graphic cards required, just little brain.


  • Xplanet: a 3d world renderer. I knew it back when I used to spend hours and hours compiling my xscreensaver package on Slackware. What I didn't know was a feature that allows it to be scripted.


  • Project Haystack: nothing new again. But I am now giving it a try. So far so good: installation went smoothly (it uses the eclipse's extensions manager) and it seems to run. Next try: to run it as my window manager! (yes, I am not on my sanest state of mind :)


Next time I receive one of those...

... I'll certainly write this back:

satisfied

quinta-feira, 16 de junho de 2005

Changes...

This is my new home, ladies and gentlemen. It is starting to gain form...

I am at finishing state of a wordpress installation. Thanks to Catsutorials for the very graphical way to import my posts from blogger.

quarta-feira, 15 de junho de 2005

A little test...

Je suis mobile!!