Monthly Archives: July 2007

I want food without containers

Recycling stickersSome time ago I wondered how can we reduce the amount of home generated waste.

The most important “input” of a house is food, and the biggest “output” is waste. So this means that some part of the input, the food, is responsible for the output. And if you just have a look at your garbage bin(s), you’ll realize that most of what you throw away are “food containers”. It seems that every single piece of food, that enters into the house, comes inside some kind of containers (from just a plastic bag to elaborated boxes). I don’t want to focus in the fact that you can do some recycling, dividing the different containers in bins. What I want to remark is that, nowadays, almost all the food you buy comes surrounded with a piece of implicit garbage… specially if you’re used to buying in supermarkets.

Aren’t the wicker baskets from our grandmothers useful anymore? Isn’t just a cloth bag enough to carry the food? Why do we need all these “almost garbage” containers?

I’m lucky to live in front of a market, a real one. I usually buy there and in a supermarket 2 streets away. I wondered what would happen to my garbage bin if I just bought in the market, using my own bag. Now I’m going to try it out. The supermarket is going to close for vacation during August!

A week configuring Ubuntu with 2 screens on an Acer Travelmate laptop

NOTICE: Find more in my tech blog: liopic.me.

[Disclaimer: This is not a normal post in my usual style. It’s just a technical reference text. I’ve spent the whole week trying to figure out how configure my laptop and an external screen. Eventually, I got it running! So I’d like to share my config here and in some ubuntu forums]

I installed Ubuntu Feisty in my Acer Travelmate 3000 (actually 3004). The first problem I faced was the panoramic resolution of the laptop screen, 1280×800. Ubuntu tried to display 1280×1024 and the aspect ratio was squeezed. Then I looked at internet and found a recipe with 915resolution (something like “915resolution 49 1280 800 24”). Later I tried to tweak the X server configuration file, xorg.conf, to get 2 screens running (the laptop one, and an external flat panel with 1280×1024). I read on Internet several posts about people trying to configure similar hardware, and all the problems they got: nothing running at all, some screen clipping, etc. Actually I had the same problems… but finally I realized where the problem was, and I got it working! Some details as follows:

Restarting gnome and checking log
First at all, you should go to tty1 with Control+Alt+F1 and do all the editing with the root user (in this case, the best option is using “sudo -s”). To restart the gnome, the command is “/etc/init.d/gdm restart”. I ran this several times, with different configurations, and then read carefully the log file (“/var/log/Xorg.0.log”) to try to understand the errors.

915resolution
This program hacks the Bios, showing different resolutions to the X server. The most common recipe seen on Internet is to overwrite mode 49 with 1280×800 and 24 bits (normally editing the /etc/default/915resolution). But this just desconfigure some modes that (in my case) are needed for the second screen!! Don’t blindy follow Internet recipes!! So, you have to choose carefully which is the best option. Look at the original options (with “915resolution -l”), and try to overwrite an unused mode, and look at the results again with “915resolution -l”. Be sure you get all the resolutions that you need. Moreover, verify in the Xorg.0.log that the needed resolutions are operative.
In my case, I’ve chosen mode 45, 1280×800 and 32 bits. This leaves the other resolution that I need (1280×1024) unchanged. So, my /etc/default/915resolution is:

MODE=45
XRESO=1280
YRESO=800
BIT=32

etc/X11/xorg.conf
If you get the previous step working, you just need minor tweak on the X server configuration file. Just add another Device (with Screen 1), another Monitor, and another Screen. Attention: X server considers pipe A (or Screen 0) as the external one, and pipe B (Screen 1) as the built-in screen. That confused me firstly. Another thing you should add is the horizontal and vertical refresh rate for both monitors… it didn’t work if I left it empty. So finally, the interesting part of this file is:

Section "Device"
	Identifier	"915-0"
	Driver		"i810"
	BusID		"PCI:0:2:0"
    Screen      0
EndSection

Section "Device"
	Identifier	"915-1"
	Driver		"i810"
	BusID		"PCI:0:2:0"
    Screen      1
EndSection

Section "Monitor"
	Identifier	"M-0"
	Option		"DPMS"
    Option "MonitorLayout" "CRT,LFP"
    Option "Display" "CRT"
    HorizSync	30-83
	VertRefresh	56-75
EndSection

Section "Monitor"
	Identifier	"M-1"
	Option		"DPMS"
    Option  "Display" "LFP"
    HorizSync	28-64
	VertRefresh	43-60
EndSection

Section "Screen"
	Identifier	"S-0"
	Device		"915-0"
	Monitor		"M-0"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" 
	EndSubSection

    SubSection "Display"
		Depth		32
		Modes		"1280x1024" 
	EndSubSection

EndSection

Section "Screen"
	Identifier	"S-1"
	Device		"915-1"
	Monitor		"M-1"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1280x800" "1280x1024" 
	EndSubSection
    SubSection "Display"
		Depth		32
		Modes		"1280x800" "1280x1024" 
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"S-0"
	Screen		"S-1" Below "S-0"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
EndSection

I hope this helps people to enjoy 2 screens!!

Helping your online reading

NOTICE: Find more in my tech blog: liopic.me.

Recently I was asked about different issues regarding NLP, due to my PhD studies in that field, and I’ve started reading again about this…

Natural Language Processing is a part of the Artificial Intelligence which studies how a computer could understand natural human languages, like English. There are a lot of subjects in NLP, but in my personal case I used syntactic analyzers to detect the parts of the phrases and the relations between them. For example, to discover if a noun is modified with the surrounding words (“the blue car in the parking lot“). This information were used in a Information Retrieval system (which is something like Google or Yahoo search), to help the system to “understand” what the user is asking for. It was an interesting application of syntactic analyzers.

Visual FormattingAnother amazing use for syntactic analyzers is Visual Text Formatting.

I found an interesting article about “Visual-Syntactic Text Formatting” and a commercial website with some examples. Basically the idea is to use the syntactic information (obtained from NLP tools) to format the text in a way that is easier to read. The result seems quite effective. Surprising idea!

Barcelona doesn’t like non-ancient mathematicians

NOTICE: Find more in my tech blog: liopic.me.

Doing some Sunday morning random surf on the net, I found somebody trying to take pictures of streets named after mathematicians in Paris. I started wondering how many streets could I find here in Barcelona with the same subject…

No Gauss, Laplace, Euler or PointcarĂ©… just Archimedes, Pythagoras and some more greek friends.

Obviously, with this result, I’m not even going to find any computer scientist 🙁

P.S: It would be nice to live on Turing or Dijkstra street.