Archive for the ‘personal’ Category

Cof cof… dust… new stuff

Monday, March 16th, 2009

I’ll start mixing english and portuguese posts. And I’ll probably start writing about bicycles and other stuff, not only about my geek side (dunno if it’s possible) :-P

Thinking about changing the layout too, this blue-wordpress-default is boring (maybe it’s just me :-])

I’m starting a personal wiki too (http://wiki.brunogola.com.br/).

Probably updating my wordpress installation as well.

HP 2133 and Ubuntu

Wednesday, October 29th, 2008

Last week I got a HP 2133 mini notebook for me to use on presentations, college, meetings, events, etc. It’s a very nice toy with 1Gb RAM, a 1.2 GHz VIA Processor, 120Gb of storage, Wifi and bluetooth. Well, it’s very handy and the keyboard is amazing… except for the key, that is a little smaller than the on in my “official” notebook, and I always try to press it in the wrong place :-P

But… I’ve spent a lot of time to make it work with my Ubuntu. Why? Mainly because of the freakin’ VIA proprietary video driver. So I decided to write here some tips about how to get Ubuntu working on the 2133 (after trying to configure the xorg.conf for 3 hours because I hadn’t made a backup of the one that was working :P ).

The problem I have is that the desktop is bigger than the screen. Oh, you say, it’s just the Virtual xorg.conf Option.

IT’S NOT. Damn it!

Thanks to VIA there is a driver option called PanelID. This option is “well documented” in the README file.

The first thing you need to do is to tell the driver that your PanelID is 17. Why? I really don’t know. PanelID 17 means, accordingly to the README, that your display (or your Panel) resolution is 1024×600. The problem is that I want my resolution to be 1280×768 (which is supported by 2133). Anyway, using option “PanelID” 17 solves the problem partially, the desktop isn’t bigger than the screen anymore.

BUT… it thinks that your resolution is 1024×600 (because of the PanelID option, probably), so try to imagine what a 1280×768 desktop looks like in a 1024×600 display (or panel, whatever). The result is that you can see 3/4 of your Desktop, but your pointer “sees” the “panel” borders (i mean, it can’t go any longer than the screen limits).

To solve this problem you need to tell the X server that you have a Virtual display of 1024×600 (yes, you’re lying!!!) so it will arrange your 1280×768 desktop inside this virtual display of 1024×600. To do this you need to add the line

Virtual 1024 600

in the Display subsection of the Screen section.

Your xorg.conf will look like this (the relevant sections only):

Section “Device”
Identifier “via-P4M900 Device 0″
BoardName “Chrome9 HC IGP”
BusID “PCI:1:0:0″
Driver “via”
Option “Monitor-LCD” “HP-2133 LCD”
Option “PanelID” “17″
Option “NoDDCValue”
EndSection

Section “Screen”

Subsection “Display”
Depth 24
Modes “1280×768-60.0″
Virtual 1024 600
EndSubsection

EndSection

If you have any trouble with the video (or anything) trying to install Ubuntu on the HP 2133 Mini, leave a comment and I promise I’ll TRY to help :-D

More geocaching – urban geocaching

Friday, July 18th, 2008

Continuing the caches hunting reports :-)

This week me and Yuri went to Ibirapuera Garden, the main idea was to talk and to take the dust out of our skateboards, BUT I remembered that there were at least two caches there :P

We found both, actually it was very easy to find them. It was Yuri’s first geocaching experience and we decided to search another one near, but outside Ibirapuera. The chosen one was Cedro do Líbano, near enough to go with our vehicles (a skateboard and a long skateboard :P ). It was getting dark and the place where the cache is hidden did not help us. The cache must be very well hidden or it is not there anymore, we looked thought the place for 30 minutes and did not found it :-( ‘ll probably be back to search it again :)

Urban geocaching is very nice because of the curious people asking what you are doing with a GPS device looking for something :P They seem like the idea when you explain what geocaching is!

Beach geocaching – Ubatuba!

Friday, July 18th, 2008

As some of my friends seemed to like Geocaching I decided to keep they (and you reading this post) updated with my searches for treasures :P

Last Saturday, July 12th (right?? :P ), I was iin Ubatuba (as I’ve already said in my last post about my GSoC project status). Looking Geocaching.com I’ve found a Multi-cache there (ok, I didn’t found it myself but someone pointed me two caches in Ubatuba). It’s the Capricorni Tropicus cache. What’s the difference between a normal cache and a multi-cache? Well, the multi-cache is a cache with multiple coordinates. The first one (the one you will find looking Geocaching.com) will point to a place where you will find tips and steps to find the new coordinates and so on.

To make it short, the coordinates pointed to Ubatuba’s downtown, there I’ve found the next steps and solved the “puzzle” to find the new coordinates. They pointed to a place that I’ve already knew (a bit), near to a beach called (should I mention the name here? :P ). If you visit Ubatuba someday you MUST go to that beach… and bring your dive equipment :P ! Well, to reach that beach you go through a road (in very bad conditions) and stop your car near to a trail. The road goes on and I never had the chance (and the curiosity) to continue on it to see where it would take. But the coordinates pointed to the end of this road :-)

Well, after reaching the end of the road and following the hints I started to follow a trail that took me to some rocks near the sea. The place is very beautiful! You have a scenic view from Ubatuba :-) My GPS was telling that the cache was near, about 40 meters on the rocks. I left my stuff with my grandfather (yes, he was hunting with me) and started to “walk” on the rocks. After reaching the right spot i started looking through the fences, rocks and everything.

Sadly I did not found it :( I’m not sure if it is still there ’cause since last September no one found it. Anyway, the place worths the visit. It’s very calm and peaceful!

Treasure Hunting + GPS = Geocaching

Thursday, July 10th, 2008

Last Thursday, July 7th 8th (thanks Rodrigo), I was looking for some new apps that uses the GPS feature of my Nokia N95 phone and found something more interesting than a software, a treasure hunting game played by lots of people using GPS devices around the world!

The game is called Geocaching and exists since 2000 when David Ulmer decided to hide a “treasure” and made public it’s exact coordinates in an internet forum for GPS users. After three days someone found the treasure and then another one and the Geocaching was created :)

Basically you choose a “cache” (there are many sites with lists of caches around the world, the biggest one is www.geocaching.com), set up you GPS and start the hunt!

Well, as July 9th is holiday here in São Paulo I decided to search for a cache. Me and three friends (Thiago, Ricardo and Pessoal :P ) went to Serra da Cantareira to find the Pedra Grande cache :-)

After some walk (approximately 3.5 km) we were at an altitude of 1010m, what a view from São Paulo!

The cache was well hidden and we took some minutes to find it. The Geocaching rules are simple, if you find the cache you should take a gift from it and leave another for the next geocacher. You also should sign the logbook (if any) :)

We took a plastic dinosaur and an euro coin and left a Firefox tattoo (free software for geocachers, yeah!), a São Paulo train ticker, a public phone card and a card from Ricardo’s music group.

After finding the cache you should also make an entry in the site (geocaching.com for example) talking about you experience.

It was great and a really different activity. I will try to find more caches next weekends!

If you have a GPS unit, go find some caches!

GSoC officially starting

Monday, May 26th, 2008

Well, It’s already May 26 here and following the official Google Summer of Code 2008 calendar the coding for GSoC has officially started.

So let’s code.. :-)

I wish that all students to have a good summer of code.

FLISOL 2008 – Python Talk

Saturday, May 3rd, 2008

Last Saturday I gave a Python talk at FLISOL 2008 in Sào Paulo. The public was students who were learning programming (C and Visual Basic), so it was a very basic talk. The event was great and so was the talk, the only problem was that I thought that the public would be programmers with some experience, but not really. Anyway, the FATEC students seemed to like Python and some of then came to talk to me after the event to know more about the language and to ask where they could find more information!

I’ll upload my presentation somewhere.

I’ve helped to install GNU/Linux (Ubuntu) on a FATEC lab, people there were very nice!

Well, I felt like my “mission” was accomplished :-)

FISL 9.0 – GameJam and OLPyC Genius

Thursday, April 24th, 2008

At FISL 9.0 occurred the second OLPC GameJam Brasil (if you don’t know what is GameJam, take a quick look here). The difference from the GameJam occurred in São Carlos is this time we were inside FISL, an event with more than 7,000 people attending and not in a nice and peaceful laboratory :-)

Together with all this people there were lots of interesting talks going on simultaneously and a lot of nice people to talk to. Because of this “details” we started coding whit only 6 hours left for the deadline :-)

This GameJam with me were Andrews Medina and Luciano Pacheco, I met both from Python Brasil community (on PyConBrasil last year). We decided to develop a “Genius” clone for the XO, using it’s special “game-keys” and the “tablet position”. With only 6 hours to develop a game you can imagine that we were not even thinking about the graphics at all, but, suddenly a nice guy named came and offered himself to make pictures for our game. It happens that the guy was Valéssio Brito and he is an “Inkscape genius” (sorry… :P ), in less than one hour he made some cool graphics. That re-excited us and we went on with our code (less than one hour left for the deadline).

At 20h05, five minutes after the deadline, we finished the game, installed it in XO and send to the organization. It was very nice and as Pacheco said, it was one of the best experiences I could do in FISL for me :D

I must say that Andrews was shaking (like a “vara verde” as Luciano said) at the time we delivered our game… :P

Valéssio, me, Andrews and Luciano
From left to right: Valéssio, me (with the XO), Andrews and Pacheco

Thanks Pacheco, Andrews and Valéssio, it was very nice to participate :-)

Thanks to the LEC/UFRGS people that organized the GameJam and thanks to the PyGame folks becuase they’ve developed this wonderful library :-)

Supporting Python 2.5 features in PyPy – GSoC 2008

Tuesday, April 22nd, 2008

As you probably know my GSoC proposal to work on PyPy interpreter, supporting the Python 2.5 features, has been accepted. This post is a short explanation of my Google Summer of Code project.

PyPy

The PyPy project aims at producing a flexible and fast Python implementation. The guiding idea is to translate a Python-level description of the Python language itself to lower level languages. Rumors have it that the secret goal is being faster-than-C which is nonsense, isn’t it?

PyPy is divided into the python interpreter and the translator framework. The interpreter is written in RPython (a subset of Python) and the main goal is to provide an easy-to-hack (for python programmers ;) ) Python interpreter.

PyPy’s interpreter currently supports only a few features introduced in Python 2.5, like __index__ (for slicing) and some part of the ‘with’ statement. Also, the 2.5 changes to the language and to the standard library have not been ported yet (although some have been, like the ctypes).

Goal

This proposal idea is to bring Python 2.5 features and changes to PyPy interpreter, this includes porting the modules and writing code for the features it self.

Here are some of the features I’ll work on:

  • PEP 308: Conditional Expressions[*]
  • 328: Absolute and Relative Imports
  • PEP 342: New Generator Features
  • PEP 343: The with statement[*]
  • PEP 352: Exceptions as New-Style Classes

[*] part of this features are already supported by PyPy

Benefits

With support to 2.5 features and changes more the PyPy interpreter will be up-to-date so people who wants to use this features can be happy using PyPy. This probably means more people using PyPy (i hope!) :-)

Why this project?

The first reason I’ve chosen the PyPy project is that I really like their ideas and goals. I was looking for collaborating to it in some way for a long time, but it took me some time to read the docs and to really understand the project.

As I like PyPy ideas and I’m starting to plan my graduation project/bachelor’s thesis, my work on PyPy interpreter will be a big part of it. Maybe I can explain my ideas in another post :-)

I would like to thank Google (and the SoC folks), Python Software Foundation, PyPy and specially to Carl Friedrich Bolz* who will be my GSoC mentor and Leonardo Santagada who helped me to understand PyPy and to write my application.

* morepypy is a blog where PyPy developers talk to the community, it’s not Carl’s personal blog.

Thanks to my friends from Python Brasil community too.

Approved in GSoC

Monday, April 21st, 2008

As mentioned before I’ve applied to GSoC to work on PyPy for the Python Software Foundation.

Today I’m very happy to say that my project got approved and I will work on PyPy interpreter the next three months. It means that a lot of PyPy posts are coming, and the first one will be a introduction to the project, what is PyPy, the interpreter and the translation framework :)

Stay tuned if you are interested in PyPy! Congratulations to everybody that have applied to GSoC this year =)