Mai 10

gource: OpenGL-based 3D visualisation tool for source control repositories

Too much fun the tool I’ve came to know through my friend Adenilson’s blog1. In a glance one can explore effort put into a project in a way much better than any other command-line or graphical application known.

The only boring thing is to use it in my machine, a hp pavilion dv4-2167sb, which, AFAIK, still lacks a good graphical acceleration support.

I’ve made a basic debian package (using checkinstall2) for people too lazy to compile by themselves. Enjoy it3 and have fun!

[1] http://savago.wordpress.com/2010/05/21/6-months-of-plasma-in-10-minutes/
2 ???
3 ???

Jun 09

(English) Qt Codestyle Automatic Check

Página disponível somente em English.

Mai 09

(English) Git Empty Branches

Página disponível somente em English.

Mai 09

(English) Old School Techniques

Página disponível somente em English.

Abr 09

Python-Debian Packaging for Maemo

shipping pyo files

changing installation directories

rules template (CDBS + fixes)

Abr 09

Vim Scripting Using Python

Trying to solve a colleague’s problem when editing Edje files, I pushed myself into learning how to do scripting inside Vim.

Scripting wasn’t ever my choice for reasonably complex editing tasks since I refused to learn Yet Another Scripting Language just because my favorite editor wanted me to. But, for the sake of all lazy guys like me, Vim started to add python support, and python was a must learn bullet in my language listing.

However, not everything are flowers and the entry point must be configured using common vim script. Well, at least until vim supports python from its core, which – I believe – is not far from possible, since python integration has been voted as top priority for a long time.

To successfully import your python script inside vim context, one can wrap it into a vim function in an external file. Let’s call it extras.vim.

" Title-ize sentences using python str methods function! PyMakeTitle() " the ! erases previous definitions python << END " here-document (bash-style), read 'till given word import vim w = vim.current.window b = vim.current.buffer line, col = w.cursor line -= 1 b[line] = b[line].title() # str.title() method END endfunction

After using :source extras.vim command to load it, one can call this function by typing :call PyMakeTitle(). Remember repeating the :source step every time the script gets updated.

The net effect of this function is to turn all initial word letters in the current line into capitals. It proved me to be useful when editing a large LaTeX document where all section titles were small letters only.

If it comes to be a very useful function, you may map it to a key-stroke by using :nmap \t :call PyMakeTitle()<CR> inside your vimrc script.

A more complex example accessing internal vim properties. Ok, it’s a bit useless, but it demonstrates well such features.

" Auto Documentation (example code) function! PyCreateDoc() python << END import vim name = vim.eval("expand(\"&lt;cword&gt;\")") # expand word under cursor ts = int(vim.eval("&#038;ts")) # tab space property il = int(vim.eval("indent(\".\")")) # indentation on current line w = vim.current.window l, c = w.cursor docstr = '%s# @brief %s - write description' % (' ' * il, name) b = vim.current.buffer b[l-1:l-1] = [ docstr ] print 'Indent set is %d, cursor at (%d, %d)' % (ts, l, c) END endfunction

With the cursor over a function name, type :call PyCreateDoc() and watch it insert a line above containing doxygen-like formatting.

For more examples, there is an excellent material at vim’s online help (see :h python). Furthermore, there are some plugins being made using only python, take a look at Omni Completion for Python (pythoncomplete.vim) for a good reference on the power of using python inside vim.

Happy Easter Vim’ing!

Mar 09

Git References’ Pointers

Earlier this year I’ve spent some time gathering references to study Git, the version control system everybody seems to love nowadays.

Thankfully, someone took the time to bind several useful links in one central webpage. If you wanna start studying Git, that’s the place to start. Kudos for such practical people (more specifically Scott Charcon and Petr Baudis).


Just for reference, I’ll paste below the stuff I had.

Forwarded conversation
Subject: Git Documentation Pointers
From: Milton Soares
Date: Mon, Jan 19, 2009 at 12:33 PM


Just to organize and share all the references I’ve gathered about Git learning.

On-line Resources

$ git help git
$ man gittutorial

Git Homepage Resources


SVN to Git crash course


Recording of the Git tutorial given by Bart Trojanowski for the OGRE


Palestra Git para o Google by Linux Torvalds


Git from the bottom up


From: Milton Soares
Date: Tue, Jan 20, 2009 at 4:36 PM

More pointers:

GitWine – git tips by wine people


Git Wizardry


Git Wiki


Git Cheat Sheet


From: Milton Soares Filho
Date: Sat, Feb 21, 2009 at 11:15 AM

Yet another usefull link (pretty graphical explanations on git objects).

Tv’s cobweb: Git for Computer Scientists