28
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 ???


14
Jun 09

(English) Qt Codestyle Automatic Check

Página disponível somente em English.


14
Mai 09

(English) Git Empty Branches

Página disponível somente em English.


05
Mai 09

(English) Old School Techniques

Página disponível somente em English.


28
Abr 09

Python-Debian Packaging for Maemo

shipping pyo files

changing installation directories

rules template (CDBS + fixes)


09
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!


25
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).

http://git-scm.com/documentation

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

Hi.

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

http://www.kernel.org/pub/software/scm/git/docs/everyday.html
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

SVN to Git crash course

http://git.or.cz/course/svn.html

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

http://excess.org/article/2008/07/ogre-git-tutorial/

Palestra Git para o Google by Linux Torvalds

http://br.youtube.com/watch?v=4XpnKHJAok8

Git from the bottom up

http://www.newartisans.com/blog_files/git.from.bottom.up.php

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

More pointers:

GitWine – git tips by wine people

http://wiki.winehq.org/GitWine#head-079f5369fdb9346845a4a8c82475eb7a198312be

Git Wizardry

http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html

Git Wiki

http://git.or.cz/gitwiki/

Git Cheat Sheet

http://ktown.kde.org/~zrusin/git/

———-
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

http://eagain.net/articles/git-for-computer-scientists/