<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Antonio Terceiro's contents tagged with "english"</title><link>http://softwarelivre.org/terceiro</link><description>Antonio Terceiro's contents tagged with "english"</description><item><title>Ruby 2.0 released, with multiarch support^W^W^W^W</title><description>&lt;p&gt;&lt;a href="http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/"&gt;Ruby 2.0 was released&lt;/a&gt; today. This new version of the language brings some very interesting features, and according to the core team, an effort has been made to keep source level compartibility with Ruby 1.9.&lt;/p&gt;
&lt;p&gt;Debian packaging &lt;a href="http://anonscm.debian.org/gitweb/?p=collab-maint/ruby2.0.git;a=summary"&gt;is under way&lt;/a&gt; and should hit &lt;span class="caps"&gt;NEW&lt;/span&gt; soon. During the last few days I gave more attention to getting the new multiarch support &lt;a href="http://bugs.ruby-lang.org/issues/7874"&gt;fixed&lt;/a&gt; &lt;a href="http://bugs.ruby-lang.org/issues/7874"&gt;upstream&lt;/a&gt; than to the packaging bits, but the remaining packaging work should be pretty much about housekeeping.&lt;/p&gt;
&lt;p&gt;Next steps from a Debian point of view (after Wheezy is out) include:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add Ruby 2.0 support in gem2deb (should be trivial).&lt;/li&gt;
	&lt;li&gt;check what packages need fixing to support Ruby 2.0, and which are broken beyond repair.&lt;/li&gt;
	&lt;li&gt;figure out how to better exploit a multiarch-enabled Ruby.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now let&amp;#8217;s get back to fixing &lt;a href="http://udd.debian.org/bugs.cgi?release=wheezy_and_sid&amp;amp;patch=ign&amp;amp;merged=ign&amp;amp;done=ign&amp;amp;fnewerval=7&amp;amp;rc=1&amp;amp;sortby=id&amp;amp;sorto=asc&amp;amp;ctags=1&amp;amp;ctags=1&amp;amp;cdeferred=1"&gt;RC bugs&lt;/a&gt; and getting Wheezy released. :-)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt; 2013-03-06:&lt;/strong&gt; actually the multiarch support is broken in 2.0.0, and the bugs I reported were only fixed in trunk. I will probably backport those fixes in the Debian package.&lt;/p&gt;</description><pubDate>Sun, 24 Feb 2013 15:31:48 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/ruby-2.0-released-with-multiarch-supportwwww</link><guid>http://softwarelivre.org/terceiro/blog/ruby-2.0-released-with-multiarch-supportwwww</guid></item><item><title>Today I am turning 20 ...</title><description>&lt;p&gt;&amp;#8230; in hexadecimal.&lt;/p&gt;
&lt;p&gt;I have been waiting for a long time to be able to make this joke, and I will still be able to do it for the next 9 years! :-)&lt;/p&gt;</description><pubDate>Wed, 21 Nov 2012 11:09:18 -0200</pubDate><link>http://softwarelivre.org/terceiro/blog/today-i-am-turning-20-...</link><guid>http://softwarelivre.org/terceiro/blog/today-i-am-turning-20-...</guid></item><item><title>Wheezy is Coming</title><description>&lt;p&gt;&lt;a href="http://lists.debian.org/debian-devel-announce/2012/06/msg00006.html"&gt;&lt;img src="http://softwarelivre.org/articles/0044/8477/Wheezy-is-Coming.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The original image (in wallpaper resolution) was made^Whacked by my friend &lt;a href="http://softwarelivre.org/aurium/blog/wheezy-is-coming"&gt;Aurélio&lt;/a&gt; .&lt;/p&gt;</description><pubDate>Thu, 28 Jun 2012 10:13:20 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/wheezy-is-coming</link><guid>http://softwarelivre.org/terceiro/blog/wheezy-is-coming</guid></item><item><title>How to make a grad student freak out</title><description>&lt;p&gt;So that grad student has just submitted his thesis and you are
invited to review it. With these quick tips, you can test the
limits of the student&amp;#8217;s willpower, and make his degree a little
more deserved by putting him up for some constructive mind games.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://softwarelivre.org/articles/0043/3370/how-to-make-a-grad-student-freak-out.png" alt="" /&gt;&lt;/p&gt;</description><pubDate>Sun, 20 May 2012 10:43:59 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/how-to-make-a-grad-student-freak-out</link><guid>http://softwarelivre.org/terceiro/blog/how-to-make-a-grad-student-freak-out</guid></item><item><title>Thesis submitted</title><description>&lt;p&gt;Last Friday, after 5 long years, I have finally submitted my PhD thesis. It was
quite a relief, more or less as if an elephant was taken off my back.&lt;/p&gt;
&lt;p&gt;An English title for my thesis would be &lt;em&gt;Structural Complexity Characterization in Software Systems&lt;/em&gt;. Here is an abstract:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This thesis proposes a theory to characterize structural complexity in
software systems. This theory aims to identify (i) the contribution of
several factors to the structural complexity variation and (ii) the
effects of structural complexity in software projects.
Possible factors in the structural complexity variation include: human
factors, such as general experience of the developers and their
familiarity with the different parts of the system; factors related to
the changes performed on the system, such as size variation and change
diffusion; and organizational factors, such as the maturity of the
software development process and the communication structure of the
project.
Effects of structural complexity include higher effort, and consequently
higher cost, in software comprehension and maintenance activities.&lt;/p&gt;
&lt;p&gt;To test the validity of the proposed theory, four empirical studies were
performed, mining data from free software project repositories. We
analyzed historical data from changes performed in 13 systems from
different application domains and written in different programming
languages.&lt;/p&gt;
&lt;p&gt;The results of these studies indicated that all the factors studied
influenced the structural complexity variation significantly in at least
one of the projects, but different projects were influenced by different
sets of factors. The models obtained were capable of describing up to
93% of the structural complexity variation in the projects analyzed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keywords:&lt;/strong&gt;
Structural Complexity,
Software Maintainance,
Human factors in Software Engineering,
Mining Software Repositories,
Theories in Software Engineering,
Empirical Software Engineering,
Free/Open Source Software Projects.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Those who read Portuguese can check out &lt;a href="http://app.dcc.ufba.br/~terceiro/tese.git"&gt;the actual thesis
text&lt;/a&gt; as a &lt;span class="caps"&gt;PDF&lt;/span&gt; file.&lt;/p&gt;
&lt;p&gt;Most of the studies discussed in the thesis are presented in English in &lt;a href="/terceiro/publications"&gt;papers&lt;/a&gt; I have published during the last years.&lt;/p&gt;
&lt;p&gt;My defense is going to be on March 23rd. If you happen to be at Salvador at that day, please feel cordially invited.&lt;/p&gt;</description><pubDate>Tue, 28 Feb 2012 21:44:52 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/thesis-submitted</link><guid>http://softwarelivre.org/terceiro/blog/thesis-submitted</guid></item><item><title>A visual cheat sheet for ANSI color codes</title><description>&lt;p&gt;Now and then I want to output some &lt;a href="http://en.wikipedia.org/wiki/ANSI_escape_code"&gt;&lt;span class="caps"&gt;ANSI&lt;/span&gt; color escape codes&lt;/a&gt; from software I write, and I always end up doing some trial-and-error to figure out the exact codes I want. Sometimes it&amp;#8217;s overkill to add a dependency on an &lt;a href="http://packages.debian.org/sid/ruby-term-ansicolor"&gt;existing library&lt;/a&gt; that already deals with it, or the language I am using does not have one.&lt;/p&gt;
&lt;p&gt;There are a lot of listings of the &lt;span class="caps"&gt;ANSI&lt;/span&gt; color codes out there, but I couldn&amp;#8217;t find one that matches the actual codes with the resulting effect in a visual way. Even the Wikipedia article has a colored table with the actual colors, but I have to lookup manually which code combination produces which color.&lt;/p&gt;
&lt;p&gt;So I spent a few minutes to write a shell script that prints all useful combinations, formatted with themselves. This way I can quickly figure out which exact code I want to achieve the desired effect.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://softwarelivre.org/articles/0040/0610/ansi-color-demo.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The code for now is &lt;em&gt;very simple&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
#!/bin/sh -e

for attr in $(seq 0 1); do
  for fg in $(seq 30 37); do
    for bg in $(seq 40 47); do
      printf "\033[$attr;${bg};${fg}m$attr;$fg;$bg\033[m "
    done
    echo
  done
done
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Is there a package in Debian that already does that? Would people find it useful to have this packaged?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt; it turns out you can find some similar stuff on google images. It was a quick and fun hack, though.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update 2:&lt;/strong&gt; Replacing &lt;code&gt;echo -n&lt;/code&gt; with &lt;code&gt;printf&lt;/code&gt; makes the script work independently if /bin/sh is bash or dash. Thanks to &lt;em&gt;cocci&lt;/em&gt; for pointing that out.&lt;/p&gt;</description><pubDate>Sat, 28 Jan 2012 11:17:28 -0200</pubDate><link>http://softwarelivre.org/terceiro/blog/a-visual-cheat-sheet-for-ansi-color-codes</link><guid>http://softwarelivre.org/terceiro/blog/a-visual-cheat-sheet-for-ansi-color-codes</guid></item><item><title>Life after exec()</title><description>&lt;p&gt;From the &amp;#8220;not necessarily big news, but still useful&amp;#8221; department.&lt;/p&gt;
&lt;p&gt;The situation: for Very Good Reasons™&lt;sup class="footnote"&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;, you want to replace your current process by calling &lt;a href="http://en.wikipedia.org/wiki/Exec_%28operating_system%29" title=""&gt;exec&lt;/a&gt;, but you still want to have the chance to do something after the process you exec()ed finishes.&lt;/p&gt;
&lt;p&gt;This is a simple technique I just came up with: just before replacing the current process by calling &lt;code&gt;exec()&lt;/code&gt;, you &lt;a href="http://en.wikipedia.org/wiki/Fork_%28operating_system%29"&gt;&lt;code&gt;fork()&lt;/code&gt;&lt;/a&gt; a process in the background that will wait for the current process id to disappear from  the process list, and then does whatever you want to do.&lt;/p&gt;
&lt;p&gt;A simple proof-of-concept I wrote is composed of two bash programs: &lt;code&gt;wrapper&lt;/code&gt; and &lt;code&gt;real&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;real&lt;/code&gt; is really simple: it just waits a few seconds and then prints its process id to the console:&lt;/p&gt;
&lt;pre style="background: #eeeeec; padding: 5px; border: 1px solid #d3d7cf;"&gt;&lt;code style="color: #2e3436;"&gt;#!/bin/bash
  
sleep 5
echo $BASHPID
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;wrapper&lt;/code&gt; is the program that handles the situation we want to exercise: it replaces itself with &lt;code&gt;real&lt;/code&gt;, but still has the chance to do something after &lt;code&gt;real&lt;/code&gt; finishes. In this case, &lt;code&gt;wrapper&lt;/code&gt; notifies the user that &lt;code&gt;real&lt;/code&gt; finished.&lt;/p&gt;
&lt;pre style="background: #eeeeec; padding: 5px; border: 1px solid #d3d7cf;"&gt;&lt;code style="color: #2e3436;"&gt;#!/bin/bash

echo $BASHPID
real_program_pid=$BASHPID
(
  while ps -p "$real_program_pid" &amp;gt;/dev/null; do
    sleep 0.1s
  done
  notify-send 'real program finished'
) &amp;amp;
exec ./real
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One nice property that &lt;code&gt;wrapper&lt;/code&gt; explores is that when &lt;code&gt;exec()&lt;/code&gt; starts &lt;code&gt;real&lt;/code&gt;, it really &lt;strong&gt;replaces&lt;/strong&gt; &lt;code&gt;wrapper&lt;/code&gt;, and therefore has the same process id (in this case accessible by bash in the &lt;code&gt;$BASHPID&lt;/code&gt; variable). Because of this, the background process that &lt;code&gt;wrapper&lt;/code&gt; starts just before the &lt;code&gt;exec()&lt;/code&gt; call already knows which process it has to watch for.&lt;/p&gt;
&lt;p&gt;The actual code for waiting is not optimal, though. I cannot use &lt;code&gt;waitpid()&lt;/code&gt; (the &lt;code&gt;wait&lt;/code&gt; builtin in bash), since &lt;code&gt;real&lt;/code&gt; is not a child process of &lt;code&gt;wrapper&lt;/code&gt;. I went with a brute force approach here, and I am pretty sure there is a cheaper way to wait for a random &lt;span class="caps"&gt;PID&lt;/span&gt; without a busy loop (but that wasn&amp;#8217;t the point here).&lt;/p&gt;
&lt;p&gt;&lt;a name="fn1" /&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;
&lt;strong&gt;update:&lt;/strong&gt; I &lt;em&gt;am&lt;/em&gt; aware of the classic &lt;code&gt;fork()&lt;/code&gt;/&lt;code&gt;exec()&lt;/code&gt; pattern. My Very Good Reasons™ include the fact that I can&amp;#8217;t control the flow: I am writing a plugin for a program that calls its plugins in sequence, and after that, calls &lt;code&gt;exec()&lt;/code&gt;, but my plugin is interested in doing some work after &lt;code&gt;exec()&lt;/code&gt; finishes.&lt;/p&gt;</description><pubDate>Mon, 09 Jan 2012 10:43:56 -0200</pubDate><link>http://softwarelivre.org/terceiro/blog/life-after-exec</link><guid>http://softwarelivre.org/terceiro/blog/life-after-exec</guid></item><item><title>Laptop fun, or "WTF, HP?"</title><description>&lt;p&gt;A couple of weeks ago my old laptop decided to rest forever, and I was forced to impose some economic pressure onto the consumption of the planet resources by acquiring a new one. Fortunately this happened while I am still here in Canada, where it is reasonably cheaper to get a decent laptop than it is in Brazil. Although I did not have the budget I wanted for buying a really kick ass laptop, I was able to buy a decent one, an HP Pavilion G6 1B74CA.&lt;/p&gt;
&lt;p&gt;I went on 4 different shops with a &lt;span class="caps"&gt;USB&lt;/span&gt; stick loaded with Debian Live to check whether all the hardware would work ok. I always asked one of the salesman before rebooting the laptops, but it was funny to see the reactions of the different employees who came by to check what I was doing: some of them barely noticed that &lt;span class="caps"&gt;GNOME&lt;/span&gt; was not Windows &lt;span class="caps"&gt;XYZ&lt;/span&gt;, and and some asked whether I was hacking the laptops.&lt;/p&gt;
&lt;p&gt;Unfortunately, I wasn’t able to find a single laptop in which the wireless worked out of the box with the Squeeze kernel, which sucks. I searched over the internet a lot, and it seems that even the &lt;a href="http://laclinux.com/gnu/Start"&gt;vendors&lt;/a&gt; &lt;a href="http://www.gnu.org/links/companies.html"&gt;recommended by the &lt;span class="caps"&gt;FSF&lt;/span&gt;&lt;/a&gt; do not provide laptops with wireless cards that work without non-free blobs.&lt;/p&gt;
&lt;p&gt;Other issue I had was with the Intel graphics. After the kernel enables the modesetting, the backlight goes to the minimum and it looks like you have no video. There are a couple of workarounds in the internet, and the one in which you add “acpi_osi=Linux acpi_backlight=vendor” to the kernel parameters makes the laptop turn on by itself in the morning. This is probably caused by broken &lt;span class="caps"&gt;ACPI&lt;/span&gt; handling in the &lt;span class="caps"&gt;BIOS&lt;/span&gt;, who almost always is written by people on crack.&lt;/p&gt;
&lt;p&gt;The other issues I had were related to the keyboard. First, the &lt;span class="caps"&gt;BIOS&lt;/span&gt; came by default with “Access keys mode” enabled, which means that by default pressing F2-F12 actually activated the “multimedia keys” instead of the real function keys. It was disapointing to hit F12 and have my wireless turned off. After disabling this in the &lt;span class="caps"&gt;BIOS&lt;/span&gt; setup, it was OK.&lt;/p&gt;
&lt;p&gt;Well, not quite: for some reason, Fn+F4 did not generate the expected keycodes. After some research on the internet, I found a interesting &lt;a href="https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/508847"&gt;Ubuntu bug&lt;/a&gt; . It seems that the “latest and greatest” version of Windows starts its video setup application via the Meta+P shortcut (“Meta” is the actual name of what Windows people call “the Windows key”). Guess what the morons writing the HP &lt;span class="caps"&gt;BIOS&lt;/span&gt; did … yes, they made the keys Fn+F4 (where F4 has “video setup” as its “multimedia key”) generate the keycodes for Meta+P!&lt;/p&gt;
&lt;p&gt;It would be a lot easier for everyone in the world if the people at Microsoft just make their stuff listen to both Meta+P and the “video setup” keycode, which is generated by every laptop out there, to activate the Windows screen setup thing. This way the &lt;em&gt;very smart dudes &lt;/em&gt;writing BIOS at HP wouldn’t need to make Fn+F4 generate the keycodes for Meta+P and break every single desktop that is not procuced at Redmond.&lt;/p&gt;</description><pubDate>Mon, 12 Sep 2011 19:56:58 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/laptop-fun-or-wtf-hp</link><guid>http://softwarelivre.org/terceiro/blog/laptop-fun-or-wtf-hp</guid></item><item><title>Handling upstream patches with git-export-debian-patches</title><description>&lt;p&gt;These days I briefly discussed with a fellow Debian developer about how to maintain upstream patches in Debian packages with Git, what brought me to rethink a little about my current practices. What I usually do is pretty much like point 4 in Raphael's post &lt;a href="https://raphaelhertzog.com/2010/11/18/4-tips-to-maintain-a-3-0-quilt-debian-source-package-in-a-vcs/"&gt;"4 tips to maintain a “3.0 (quilt)” Debian source package in a VCS"&lt;/a&gt;:  I make commits in the Debian packaging branch, or in a separate branch that is merged into the Debian packaging branch. Then I add the &lt;code&gt;single-debian-patch&lt;/code&gt; option to &lt;code&gt;debian/source/options&lt;/code&gt; so that a single Debian patch is generated, and include a patch header that points people interested in the individual changes to the public Git repository where they were originally done.&lt;/p&gt;
&lt;p&gt;My reasoning for doing so was the following: most upstream developers will hardly care enough to come check the patches applied against their source in Debian, so it's not so important to have a clean source package with separated and explained patches. But then there is the people who will actually care about the patches: other distribution developers. Not imposing a specific VCS on them to review the patches applied in Debian is a nice thing to do.&lt;/p&gt;
&lt;p&gt;Then I wrote a script called git-export-debian-patches (&lt;a href="/terceiro/files/git-export-debian-patches/git-export-debian-patches"&gt;download&lt;/a&gt;, &lt;a href="/terceiro/files/git-export-debian-patches/manpage"&gt;manpage&lt;/a&gt;), which was partly inspired by &lt;a href="http://www.cs.unb.ca/~bremner/blog/posts/git-classify/"&gt;David Bremner's script&lt;/a&gt;. It exports all commits in the Debian packaging branch that do not touch files under debian/ and were not applied upstream to debian/patches. The script also creates an appropriate debian/patches/series files. The script is even smart enough to detect patches that were later reverted in the Debian branch and exclude them (and the commit that reverted them) from the patch list.&lt;/p&gt;
&lt;p&gt;The advantage I see over gbp-pq is that I don't need to rebase (and thus lose history) to have a clean set of patches. The advantage over the &lt;a href="http://www.cs.unb.ca/~bremner/blog/posts/yagq/"&gt;gitpkg quilt-patches-deb-export-hook hook&lt;/a&gt; is that I don't need to explicitly say which ranges I want: every change that is merged in master, was not applied upstream and was not reverted gets listed as a patch. To be honest I don't have any experience with either gbp-pq or gitpkg and these advantages were based on what I read, so please leave a (nice ;-)) comment if I said something stupid.&lt;/p&gt;
&lt;p&gt;I am looking forward to receive feedback about the tool, specially about potential corner cases in which it would break. For now I have tested it in a &lt;a href="http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/cucumber.git;a=summary"&gt;package&lt;/a&gt; with simple changes agains upstream source, and it seems fine.&lt;/p&gt;</description><pubDate>Sat, 13 Aug 2011 22:03:41 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/handling-upstream-patches-with-git-export-debian-patches</link><guid>http://softwarelivre.org/terceiro/blog/handling-upstream-patches-with-git-export-debian-patches</guid></item><item><title>Playing with JPEG quality and file size</title><description>&lt;p&gt;This is probably no news at all for graphics/image processing experts, but its something I've just learnt myself  and I thought it would be fun to share.&lt;/p&gt;
&lt;p&gt;I am writing a static HTML photo algum generator and was a little suspicious of the size of the generated JPEG images. I thought "well, these JPEGs should not be that large ..."&lt;/p&gt;
&lt;p&gt;I did some quick research and found out that &lt;a href="http://www.imagemagick.org/"&gt;ImageMagick&lt;/a&gt; uses JPEG quality 92 by default and was curious how file size would vary as I changed the output quality.&lt;/p&gt;
&lt;p&gt;Then I took an image and produced thumbnails for it with the "JPEG quality" parameter ranging from 1 to 100 to check 1) how the file size varies with quality and 2) how much quality actually makes any difference when viewing the images.&lt;/p&gt;
&lt;p&gt;To generate the thumbnails with varying quality, I did the following:&lt;/p&gt;
&lt;pre&gt;$ for i in $(seq -f %03g 1 100); do convert -scale 640x480 -quality $i /path/to/original.jpg $i.jpg; echo $i; done&lt;/pre&gt;
&lt;p&gt;Then I generated a data file by calculating the size of each file with du and piping the results through sed and awk:&lt;/p&gt;
&lt;pre&gt;$ du -b [0-9]*.jpg | sed 's/.jpg//' | awk '{ print $2 " " $1 }'&lt;/pre&gt;
&lt;p&gt;The generated data file looks this, with JPEG quality in first column and file size in bytes in the second column:&lt;/p&gt;
&lt;pre&gt;001 20380
002 20383
003 20634
004 21106
[...]&lt;/pre&gt;
&lt;p&gt;Regarding to file size, it seems like between 1 and 50, file size grows sublinearly with quality. Beyond that, the curve reaches an inflection point and grows in a way that looks, if not exponentially, at least polynomially.&lt;img src="/articles/0034/7809/jpeg-file-size-by-quality.png?1312729367" alt="Jpeg-file-size-by-quality" /&gt;&lt;/p&gt;
&lt;p&gt;The above plot was produced in a &lt;a href="http://www.r-project.org/"&gt;R session&lt;/a&gt; that looked like this:&lt;/p&gt;
&lt;pre&gt;$ R

R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)

R é um software livre e vem sem GARANTIA ALGUMA.
Você pode redistribuí-lo sob certas circunstâncias.
Digite 'license()' ou 'licence()' para detalhes de distribuição.

R é um projeto colaborativo com muitos contribuidores.
Digite 'contributors()' para obter mais informações e
'citation()' para saber como citar o R ou pacotes do R em publicações.

Digite 'demo()' para demonstrações, 'help()' para o sistema on-line de ajuda,
ou 'help.start()' para abrir o sistema de ajuda em HTML no seu navegador.
Digite 'q()' para sair do R.

&amp;gt; png()
&amp;gt; data &amp;lt;- read.table('points.dat')
&amp;gt; quality &amp;lt;- data[[1]]
&amp;gt; quality
  [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
 [19]  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36
 [37]  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54
 [55]  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72
 [73]  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90
 [91]  91  92  93  94  95  96  97  98  99 100
&amp;gt; filesize &amp;lt;- data[[2]]
&amp;gt; filesize
  [1]  20380  20383  20634  21106  21551  22012  22469  22878  23323  23715
 [11]  24103  24494  24952  25327  25725  26127  26507  26886  27216  27550
 [21]  27917  28288  28627  28945  29271  29583  29919  30280  30516  30813
 [31]  31099  31367  31679  31873  32232  32538  32704  33072  33324  33443
 [41]  33860  34055  34253  34633  34804  35074  35216  35491  35871  35935
 [51]  36030  36443  36743  36898  37120  37382  37726  38077  38307  38581
 [61]  39002  39270  39700  39962  40388  40762  41086  41629  42062  42544
 [71]  43048  43392  44062  44824  45023  45682  46532  47347  47833  48701
 [81]  49612  50423  51694  52637  53635  55243  56340  58304  59709  62162
 [91]  64207  66273  70073  74617  79917  86745  94950 105680 128158 145937
&amp;gt; plot(quality, filesize, xlab = 'JPEG Quality', ylab = 'File size')
&amp;gt; 
Save workspace image? [y/n/c]: y
&lt;/pre&gt;
&lt;p&gt;Looking at the actual generated thumbnails, somewhere after quality &amp;gt; 60 I stopped noticing the difference between increasing quality factors. Settling with a default quality of 75 seems to be good enough: the resulting static HTML album generated from a folder with 82 pictures dropped from 12MB with the default ImageMagick quality factor to 6MB with quality 75, with very little perceivable image quality loss.&lt;/p&gt;</description><pubDate>Sat, 06 Aug 2011 23:39:49 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/playing-with-jpeg-quality-and-file-size</link><guid>http://softwarelivre.org/terceiro/blog/playing-with-jpeg-quality-and-file-size</guid></item><item><title>Hello, Planet Debian</title><description>&lt;p&gt;Hello, world! So, now this blog is being syndicated on Planet Debian, and I decided to write something to introduce myself.&lt;/p&gt;
&lt;p&gt;I was born in &lt;a href="http://en.wikipedia.org/wiki/Salvador%2C_Bahia"&gt;Salvador, Bahia, Brazil&lt;/a&gt;. I am married to Josy, a wonderful person; we do not have any kids yet, but anyone can notice we both discretely drooling when close to small children.&lt;/p&gt;
&lt;p&gt;I have a passion for building things, and making things work. Programming happens to be the better building toy that someone already invented.&lt;/p&gt;
&lt;p&gt;I became am official Debian Developer a little more than one week ago, but I have been working in the project for some time already. In the very beginning I was involved with the Perl group, but now almost all my work is in the Ruby team.&lt;/p&gt;
&lt;p&gt;I am a PhD student at Federal University of Bahia under supervision of professor &lt;a href="http://wiki.dcc.ufba.br/LES/ChristinaFlach"&gt;Christina Chavez&lt;/a&gt;. My research involves three topics I am just fascinated about: Free ("and Open Source") Software, Software Design and Empirical Software Engineering. I am investigating whether it is possible to explain the variation in Structural Complexity by analyzing developer attributes. I want to answer questions such as "do developers with more experience in a project produce more complex code?", or "do developers that focus on a single part of the project produce more complex code than developers who work on the entire project?".&lt;/p&gt;
&lt;p&gt;As part of my PhD research I have been working on &lt;a href="http://analizo.org/"&gt;analizo&lt;/a&gt;, a multi-language source code analysis and visualization toolkit. I plan to write specifically about it in a later opportunity.&lt;/p&gt;
&lt;p&gt;My other job is running my own company, &lt;a href="http://colivre.coop.br/"&gt;Colivre&lt;/a&gt;, together with several other great people. Colivre is a cooperative, which basically means that everyone who works there is also an owner of the company. We provide web solutions, in special social networking environments, social media websites and the like. Working on (and with) free software is our premise at Colivre, and most of our work involves either &lt;a href="http://noosfero.org/"&gt;Noosfero&lt;/a&gt; or &lt;a href="http://foswiki.org/"&gt;Foswiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Right now I am taking some time off from Colivre to be able to concentrate on (and finish!) my PhD. Until late September I live at the beautiful Vancouver, BC, Canada, where I am currenly a visiting reasearcher at the &lt;a href="http://www.cs.ubc.ca/labs/spl/"&gt;Software Practices Lab&lt;/a&gt; at &lt;a href="http://www.ubc.ca/"&gt;UBC&lt;/a&gt; under supervision of professor &lt;a href="http://www.cs.ubc.ca/~murphy/"&gt;Gail Murphy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So that's it, I hope to post interesting stuff here and to get your feedback whenever you find it's worth. I also maintain a &lt;a href="http://identi.ca/terceiro"&gt;microblog at identi.ca&lt;/a&gt;, where you'll find shorter (and more frequent) updates.&lt;/p&gt;</description><pubDate>Fri, 22 Jul 2011 23:58:49 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/hello-planet-debian</link><guid>http://softwarelivre.org/terceiro/blog/hello-planet-debian</guid></item><item><title>Building a Debian package out of a Rubygems' .gem file</title><description>&lt;p&gt;This post is sort of a status update on ongoing work in Debian's Ruby packaging infrastructure, i.e. the tools used to package Ruby libraries and applications (not the Ruby interpreters themselves) for Debian. We have recently added two new utilities to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;ruby-pkg-tools&lt;/span&gt;&lt;/tt&gt;:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;tt class="docutils literal"&gt;gem2tgz&lt;/tt&gt;, a tool to convert .gem files into source tarball suitable for being used as a Debian upstream tarball. This is needed because unfortunately several useful Ruby libraries and applications are only officially released in the &lt;tt class="docutils literal"&gt;.gem&lt;/tt&gt; format.&lt;/li&gt;
&lt;li&gt;a &lt;tt class="docutils literal"&gt;ruby&lt;/tt&gt; &lt;em&gt;buildsystem&lt;/em&gt; for debhelper, which will automatically build standards-compliant Debian Ruby packages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To follow the steps in this post, you'll need to build &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;ruby-pkg-tools&lt;/span&gt;&lt;/tt&gt; from the &lt;a href="svn://svn.debian.org/pkg-ruby-extras/tools/ruby-pkg-tools/trunk/" class="reference external"&gt;pkg-ruby-extras team subversion repository&lt;/a&gt; (e.g., you need ruby-pkg-tools 0.18, which is not in the archive yet). You can also &lt;a href="http://svn.debian.org/viewsvn/pkg-ruby-extras/trunk/ruby-pkg-tools/" class="reference external"&gt;browse&lt;/a&gt; the source.&lt;/p&gt;
&lt;p&gt;First you have to download a .gem file. Let's took &lt;a href="http://github.com/grosser/fast_gettext" class="reference external"&gt;fast_gettext&lt;/a&gt; as an example. Enter a temporary directory and download the latest version of the .gem:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ wget http://rubygems.org/downloads/fast_gettext-0.5.10.gem
&lt;/pre&gt;
&lt;p&gt;Now we need to convert that &lt;tt class="docutils literal"&gt;.gem&lt;/tt&gt; file into a source tarball to be used by the Debian package:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ gem2tgz fast_gettext-0.5.10.gem libfast-gettext-ruby-0.5.10.tar.gz
&lt;/pre&gt;
&lt;p&gt;Then uncompress the source tarball, and change to the extracted source directory:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ tar xzf libfast-gettext-ruby-0.5.10.tar.gz
$ cd libfast-gettext-ruby-0.5.10/
&lt;/pre&gt;
&lt;p&gt;Inside the source directory, you need the generate the Debian package files. For now, you'll use good old &lt;tt class="docutils literal"&gt;dh_make&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ dh_make -f ../libfast-gettext-ruby-0.5.10.tar.gz --single
&lt;/pre&gt;
&lt;p&gt;Then we have an almost "ready" Debian package. It still misses several documentation issues that need manual checking, but for the sake of the example in this post it is good enough already.&lt;/p&gt;
&lt;p&gt;I normally remove all the example files &lt;tt class="docutils literal"&gt;dh_make&lt;/tt&gt; generates for us:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ rm -f debian/*.ex debian/*.EX
&lt;/pre&gt;
&lt;p&gt;The next step is to change &lt;tt class="docutils literal"&gt;debian/rules&lt;/tt&gt; so that it will use our custom Debhelper build system. It's just a matter of adding an extra argument for the &lt;tt class="docutils literal"&gt;dh&lt;/tt&gt; call. The final rules file must look like this:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;#!/usr/bin/make -f&lt;br /&gt;&lt;br /&gt;%:
        dh --buildsystem=ruby $@
&lt;/pre&gt;
&lt;p&gt;Now we build the package. I normally use &lt;tt class="docutils literal"&gt;debuild&lt;/tt&gt; for that.&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ debuild
&lt;/pre&gt;
&lt;p&gt;After the build lintian will complain a lot, because our package has lots of unchanged &lt;tt class="docutils literal"&gt;dh_make&lt;/tt&gt; boilerplate, but as fas as this post is concerned, the point is that the package will install the code correctly.&lt;/p&gt;
&lt;p&gt;You can check the contents of the package with &lt;tt class="docutils literal"&gt;debc&lt;/tt&gt;, to make sure everything will be where it should. Our custom debhelper buildsystem is installing Ruby libraries to &lt;tt class="docutils literal"&gt;/usr/lib/ruby/vendor_ruby&lt;/tt&gt;, so it will available to all Ruby versions installed.&lt;/p&gt;
&lt;p&gt;Now that the package is built, you can install and test it:&lt;/p&gt;
&lt;pre class="literal-block" style="padding: 2px; background: black; color: white;"&gt;$ sudo dpkg -i ../libfast-gettext-ruby_0.5.10-1_i386.deb
[...]
$ irb -rfast_gettext
&amp;gt;&amp;gt; FastGettext.add_text_domain 'mutt', :path =&amp;gt; '/usr/share/locale'; 1&lt;br /&gt;=&amp;gt; 1&lt;br /&gt;&amp;gt;&amp;gt; FastGettext.text_domain = 'mutt'
=&amp;gt; "mutt"
&amp;gt;&amp;gt; FastGettext.locale = 'pt_BR'
=&amp;gt; "pt_BR"
&amp;gt;&amp;gt; include FastGettext::Translation
=&amp;gt; Object
&amp;gt;&amp;gt; _('Delete')
=&amp;gt; "Remover"
&lt;/pre&gt;
&lt;p&gt;I tried the above with both &lt;tt class="docutils literal"&gt;irb&lt;/tt&gt; (currently Ruby 1.8's irb) and &lt;tt class="docutils literal"&gt;irb1.9.1&lt;/tt&gt; (Ruby 1.9.2's irb), and it worked fine.&lt;/p&gt;
&lt;p&gt;This custom &lt;em&gt;buildsystem&lt;/em&gt; still misses proper handling for some special cases:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;em&gt;C extensions&lt;/em&gt;. They must be installed under &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/usr/lib/ruby/vendor_ruby/${RUBY_VERSION}/${ARCH}/&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Libraries that are specific to a single Ruby version&lt;/em&gt;. This is the case for example of libraries that got included in Ruby 1.9.x itself but are still useful for Ruby 1.8, or even C extensions that do not compile under Ruby 1.9.x. Those libraries must be installed under &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/usr/lib/ruby/vendor_ruby/${RUBY_VERSION}/&lt;/span&gt;&lt;/tt&gt; for pure-Ruby libraries and &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/usr/lib/ruby/vendor_ruby/${RUBY_VERSION}/${ARCH}/&lt;/span&gt;&lt;/tt&gt; for C extensions.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Applications&lt;/em&gt;. Normally an application should use a single and well-known Ruby version, e.g. either Ruby 1.8 &lt;strong&gt;or&lt;/strong&gt; Ruby 1.9.2. So that no matter which is the default Ruby version (the one started when &lt;tt class="docutils literal"&gt;ruby&lt;/tt&gt; is invoked), the application will work the same.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next steps include providing a &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;dh-make-ruby&lt;/span&gt;&lt;/tt&gt; tool that will convert the extracted tarball into a proper Ruby Debian package. This tool will eliminate the need for all the manual steps listed above after the &lt;tt class="docutils literal"&gt;gem2tgz&lt;/tt&gt; invocation and before the package build (&lt;tt class="docutils literal"&gt;debuild&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;dh-make-ruby&lt;/span&gt;&lt;/tt&gt; will use the Rubygems metadata that &lt;tt class="docutils literal"&gt;gem2tgz&lt;/tt&gt; puts inside the generated tarball to automatically fill important files in the package, such as &lt;tt class="docutils literal"&gt;debian/control&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;debian/copyright&lt;/tt&gt;. It will also generate a &lt;tt class="docutils literal"&gt;debian/rules&lt;/tt&gt; that is ready to go for most packages. Hopefull the generated source package will also as lintian-clean as possible.&lt;/p&gt;
&lt;p&gt;There is an existing implementation of &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;dh-make-ruby&lt;/span&gt;&lt;/tt&gt; &lt;a href="http://www.dzeta.jp/~junjis/files/dh-make-ruby/" class="reference external"&gt;out there&lt;/a&gt;, which will be surely taken into account when building our own.&lt;/p&gt;
&lt;p&gt;There is also lots of documentation that needs to be written/updated, and all help we get will be appreciated.&lt;/p&gt;</description><pubDate>Sun, 17 Oct 2010 13:02:27 -0200</pubDate><link>http://softwarelivre.org/terceiro/blog/building-a-debian-package-out-of-a-rubygems-.gem-file</link><guid>http://softwarelivre.org/terceiro/blog/building-a-debian-package-out-of-a-rubygems-.gem-file</guid></item><item><title>A better svn diff</title><description>&lt;p&gt;Since I started using &lt;a href="http://git-scm.org/"&gt;git&lt;/a&gt;, every time I need to use &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; again I suffer. The output of `git diff` is so nice compared to the one produced `svn diff` that it hurts. I've alredy been struggling with that &lt;a href="/terceiro/blog/fazendo-o-svn-diff-ser-suportavel"&gt;previously&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now I think I've achieved the perfect solution to make `svn diff` behave just like `git diff`. I've documented it in this post hoping to help other poor souls like me who still have to use Subversion now and then.&lt;/p&gt;
&lt;p&gt;Step 1: install &lt;a href="http://colordiff.sourceforge.net/"&gt;colordiff&lt;/a&gt;. It's installed on Debian, so the installation required me no effort at all.&lt;/p&gt;
&lt;p&gt;Step2 (optional): configure colordiff to use your preferred set of colors. My ~/.colordiffrc contains the following, to match the same colors used by default by `git diff`:&lt;/p&gt;
&lt;pre style="padding: 1em; background-color: black; color: white;"&gt;banner=no&lt;br /&gt;color_patches=no&lt;br /&gt;plain=off&lt;br /&gt;newtext=darkgreen&lt;br /&gt;oldtext=darkred&lt;br /&gt;diffstuff=white&lt;br /&gt;cvsstuff=darkyellow&lt;/pre&gt;
&lt;p&gt;Step 3: create a script to be called by Subversion when running `svn diff`. In my case, I called it svn-diff and stored it in ~/bin (which is in my $PATH), but you can put it in /usr/local/bin or any other directory that is in your $PATH. The contents of ~/bin/svn-diff is the following:&lt;/p&gt;
&lt;pre style="padding: 1em; background-color: black; color: white;"&gt;&lt;span class="Comment"&gt;#!/bin/sh&lt;/span&gt;

&lt;span class="Statement"&gt; &lt;/span&gt;colordiff &lt;span class="Statement"&gt;-u&lt;/span&gt; &lt;span class="Statement"&gt;-L&lt;/span&gt; &lt;span class="Statement"&gt;"&lt;/span&gt;&lt;span class="PreProc"&gt;${&lt;/span&gt;&lt;span class="PreProc"&gt;3&lt;/span&gt;&lt;span class="PreProc"&gt;}&lt;/span&gt;&lt;span class="Statement"&gt;"&lt;/span&gt; &lt;span class="Statement"&gt;-L&lt;/span&gt; &lt;span class="Statement"&gt;"&lt;/span&gt;&lt;span class="PreProc"&gt;${&lt;/span&gt;&lt;span class="PreProc"&gt;5&lt;/span&gt;&lt;span class="PreProc"&gt;}&lt;/span&gt;&lt;span class="Statement"&gt;"&lt;/span&gt; &lt;span class="Statement"&gt;"&lt;/span&gt;&lt;span class="PreProc"&gt;${&lt;/span&gt;&lt;span class="PreProc"&gt;6&lt;/span&gt;&lt;span class="PreProc"&gt;}&lt;/span&gt;&lt;span class="Statement"&gt;"&lt;/span&gt; &lt;span class="Statement"&gt;"&lt;/span&gt;&lt;span class="PreProc"&gt;${&lt;/span&gt;&lt;span class="PreProc"&gt;7&lt;/span&gt;&lt;span class="PreProc"&gt;}&lt;/span&gt;&lt;span class="Statement"&gt;"&lt;/span&gt;
&lt;span class="Statement"&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;After creating the script, you need to make it executable:&lt;/p&gt;
&lt;pre style="padding: 1em; background-color: black; color: white;"&gt;$ chmod +x ~/bin/svn-diff&lt;/pre&gt;
&lt;p&gt;Step 4: tell Subversion to use your script instead of plain diff on `svn diff`. To do that, locate the "helpers" section in your Subversion configuration file (~/.subversion/config), and set the diff-cmd setting to the name you gave to your custom script (svn-diff in my case):&lt;/p&gt;
&lt;pre style="padding: 1em; background-color: black; color: white;"&gt;[helpers]&lt;br /&gt;diff-cmd = svn-diff&lt;/pre&gt;
&lt;p&gt;There is only one thing missing with regard to `git diff`: the nice pager behaviour. Git invokes that system pager in a way that less will receives the options "-FRSX". These options make less exit imediately if the output fits in one terminal screen and output the ANSI sequences (and thus colors) generated by colordiff in raw format, among other things. I couldn't find a way to emulate this: since `svn diff` will call our custom  diff command once for each changed file, we can't call the pager inside svn-diff. A comprimise is doing `svn diff | less -FRSX` , or setting the LESS environment variable to 'FRSX' and doing simply `svn diff | less`.&lt;/p&gt;
&lt;p&gt;That's it! Now you can almost forget you are using Subversion (until you need to do some merging).&lt;/p&gt;</description><pubDate>Wed, 06 Oct 2010 17:01:58 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/a-better-svn-diff</link><guid>http://softwarelivre.org/terceiro/blog/a-better-svn-diff</guid></item><item><title>Getting more out of Gwibber</title><description>&lt;p&gt;Gwibber has frustrated me as a microblog reader. A minor issue I have with it is that sometimes I just can't post/reply through it. I don't know whether it is related to the microblogging services have crashed, which is not Gwibber's fault, but it would be nice if if at least warned the user with a "could not send your post" error message.&lt;/p&gt;
&lt;p&gt;But the major issue I have with it is that I cannot see enough back in time: since I definitively do not check it all the time, I often lose posts that were not done in the last 24 hours. I tried to solve this by unfollowing people that post a lot, but it did not solve the problem.&lt;/p&gt;
&lt;p&gt;I've had read that the &lt;a href="http://apiwiki.twitter.com/Twitter-API-Documentation" class="reference external"&gt;Twitter API&lt;/a&gt; , which is supported by &lt;a href="http://status.net/" class="reference external"&gt;StatusNet&lt;/a&gt; at &lt;a href="http://identi.ca/" class="reference external"&gt;identi.ca&lt;/a&gt;, supports a &lt;tt class="docutils literal"&gt;count&lt;/tt&gt; argument, which indicated how many posts will be provided, and that it defaults to 20.&lt;/p&gt;
&lt;p&gt;Then I did what every programmer should do: look at the source code. I looked inside the implementation of identi.ca account support in Gwibber source code, and found out that it already uses this parameter, although there is no user interface for setting it. Every account has a &lt;tt class="docutils literal"&gt;receive_count&lt;/tt&gt; attribute that defines how many posts will be fetched from the servers, and it defaults to 20.&lt;/p&gt;
&lt;p&gt;While there is no UI for &lt;tt class="docutils literal"&gt;receive_count&lt;/tt&gt;, you'll need to set this attribute directly in gconf. I used &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;gconf-editor&lt;/span&gt;&lt;/tt&gt; for that, but there are a couple of other options out there. Go to apps/gwibber/accounts, find your accounts, and add a new integer key/value pair there, with key "receive_count", and the value you want to.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="/thumbnails/0022/4623/gwibber-receive-count_display.png?1278422350" height="331" alt="setting receive_count with gconf-editor" width="500" /&gt;&lt;/p&gt;</description><pubDate>Tue, 06 Jul 2010 10:25:17 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/getting-more-out-of-gwibber</link><guid>http://softwarelivre.org/terceiro/blog/getting-more-out-of-gwibber</guid></item><item><title>Distraction-free writing with vim and awesome</title><description>&lt;p&gt;I've recently learn about distraction-free text editing &lt;a href="http://lucasr.org/2010/05/27/distraction-free-blogging/"&gt;from Lucas&lt;/a&gt;, and really liked the idea. Turns outs it is pretty easy to implement it with my beloved &lt;a href="http://www.vim.org/"&gt;vim&lt;/a&gt; text editor.&lt;/p&gt;
&lt;p&gt;Removing all distraction while using the console vim is trivial. I just need to switch my &lt;a href="http://awesome.naquadah.org/"&gt;awesome&lt;/a&gt; workspace to full-screen layout, and that's it. The terminal window running vim will take the entire screen space, and then it's me and vim. No menus, no buttons, nothing.&lt;/p&gt;
&lt;p&gt;Achieving the same effect with gvim is a bit more tricky: besides putting the awesome workspace to use full-screen layout, you have to turn off both the menus and the toolbar. To do that, I mapped the F11 and F12 keys to turn the menus off and on, respectively, by adding the following lines to my ~/.gvimrc:&lt;/p&gt;
&lt;pre&gt;map &amp;lt;F11&amp;gt; :set guioptions-=m&amp;lt;CR&amp;gt;:set guioptions-=T&amp;lt;CR&amp;gt;&lt;br /&gt;map &amp;lt;F12&amp;gt; :set guioptions+=m&amp;lt;CR&amp;gt;:set guioptions+=T&amp;lt;CR&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="/articles/0021/3486/distraction-free-gvim.png?1275676999" alt="Distraction-free-gvim" /&gt;&lt;/p&gt;
&lt;p&gt;You can check out the result in the above screeshot. Yes, that is my entire screen.&lt;/p&gt;
&lt;p&gt;The tip for toggling menu and toolbars came from &lt;a href="http://vim.wikia.com/wiki/Hide_toolbar_or_menus_to_see_more_text"&gt;the vim wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You ask me: what's the point of running gvim if you are disabling the menus and the toolbar? Several reasons: the fonts look nicer in gvim, the colors are better than the console ones, and I can turn the menu back on if I need (for example to do something I do not remember the command for).&lt;/p&gt;</description><pubDate>Fri, 04 Jun 2010 15:57:35 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/distraction-free-writing-with-vim-and-awesome</link><guid>http://softwarelivre.org/terceiro/blog/distraction-free-writing-with-vim-and-awesome</guid></item><item><title>A little more impressive</title><description>&lt;p&gt;&lt;a href="http://impressive.sourceforge.net/"&gt;Impressive&lt;/a&gt; is a slide presentation application. Not a presentation authoring  application, it does very well a single job: presenting. To create the slides, you can use &lt;a href="http://www.latex-project.org/"&gt;LaTeX&lt;/a&gt; and &lt;a href="http://latex-beamer.sourceforge.net/"&gt;Beamer&lt;/a&gt;, or export a PDF file from OpenOffice.org, or (put your favorite slide authoring tool here). Impressive is &lt;a href="http://packages.debian.org/impressive"&gt;packaged in Debian&lt;/a&gt;, and probably in other operating systems as well, so using it requires no effort at all.&lt;/p&gt;
&lt;p&gt;Impressive has very nice features, such as an overview screen displaying thumbnails of all slides, zooming, highlighting specific areas of the slides, a spotlight that follows the mouse and even the possibility of scripting your presentations with arbitrary Python code.&lt;/p&gt;
&lt;p&gt;Another great impressive feature is its collection of transition effects.I've just sent out a small contribution, adding a new transition effect: fade in/fade out: the current slide is faded out to black, and then faded the black in the next slide.&lt;/p&gt;
&lt;p&gt;&lt;img src="/articles/0020/8005/impressive-fadein-fadeout.png?1274024321" alt="Impressive-fadein-fadeout" /&gt;&lt;/p&gt;
&lt;p&gt;This seems to be the default transition effect in &lt;a href="http://en.wikipedia.org/wiki/Keynote_%28presentation_software%29"&gt;Apple's Keynote&lt;/a&gt;, and I must admit that it is very cool and I &lt;em&gt;wanted&lt;/em&gt; it. :-)&lt;/p&gt;
&lt;p&gt;So, with the &lt;a href="/terceiro/files/impressive-fadeoutfadein.diff"&gt;patch&lt;/a&gt; I've just sent out, I hope to contribute with making impressive a little more impressive than it already is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;update(17/05):&lt;/strong&gt; I already got a reply from Impressive's author Martin Fiedler, and the transition was already &lt;a href="http://impressive.svn.sourceforge.net/viewvc/impressive?view=rev&amp;amp;revision=32"&gt;included&lt;/a&gt; in the subversion repository. His implementation is a lot better than mine. :-)&lt;/p&gt;</description><pubDate>Sun, 16 May 2010 12:51:53 -0300</pubDate><link>http://softwarelivre.org/terceiro/blog/a-little-more-impressive</link><guid>http://softwarelivre.org/terceiro/blog/a-little-more-impressive</guid></item></channel></rss>