Archive for the ‘ Uncategorized ’ Category

False earthquake. True superstition.

If you don’t live in Italy or you haven’t read news from this country probably you haven’t heard news about the terrible earthquake which was supposed to happen on May 11th.

However I think that this is a story which is worth to be told, because it teaches much about our culture.

A man called Raffaele Bendandi (died in 1979) stated that he could foresee the occurrence of future earthquake, with a pretty high accuracy about place and time. His theory was based on the motion of planets and Moon.  He believed that earthquakes are caused by tidal forces of massive objects in the Solar System. In the end it wasn’t such a bad idea, however it has been proven to be false. Recently someone on the internet stated that Bendandi said that an earthquake was to hit Rome on 11th day of May. False news travel fast, so everyone in Rome knew about the earthquake. One would think that, in 2011, people should know enough about science to understand that it is impossible to foresee earthquakes, not to mention earthquake thirty years from now. Well, it didn’t go that well, in facts a lot of people were scared by the prediction and didn’t even go to work or  slept in their cars or somewhere else. I can’t even imagine what will happen on 2012.

Copernican revolution never happened

Some weeks ago I opened my browser (I’m trying rekonq) and I saw an image from APOD.

A strange signal received by the radiotelescope SETI

I read the description without paying much attention and, for a moment, I actually thought that we had caught some alien signal. A few words crossed my mind : “Everything is about to change”.

 

Now I’m thinking, did people ever realized that the sky above is an infinite space of possibilities? Different worlds, different suns, beautiful horizons that we will never able to see are up there, too far from us to reach, but they are there. Maybe even different civilizations, cultures, creatures. Things that our earthly imagination cannot even conceive.
I don’t think that the fact that we will may never be able to reach them makes this less fascinating.

From what I see, people still live on a flat Earth, with a painted sky above them. Stars are nothing but tiny sparks in the sky, and they are barely visible due to light pollution.

I really hope that someday we will be able to read some signal coming from an alien intelligent life form. I know that any answer from us would take hundreds of thousands of years and a dialogue would be impossible, but that would really change the way we look at the sky above us and the Earth below us.

“Live long and prosper”

No audio from headphone on Ubuntu on my Asus laptop

I have an Asus Notebook, A6Q00VM and it mounts this audio card:
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04)

I’m using Ubuntu on this notebook, normally I would go with Debian Testing but I want to keep in touch with this famous distro so I keep it in my old notebook, just in case I get nostalgic. However, the problem is that I don’t get any audio from my headphones. Solution is to add the following lines in /etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=z71v position_fix=1
Don’t ask me what they mean. However reboot your system and you should be able to enjoy music without annoying your neighbors, or you may annoy them even more with your new speakers.

The funny thing is that I did the same thing with 7.10 (my first approach to linux!) to solve the same problem.

2011 for the Italian television

2011: On the second day of the new year on italian public television you can see:
Horoscopes, Fortune-tellers, Magicians and a subtle commercial of a creationist book for children.

1011: On the second day of the new year at the court of Hugh Capet of France you could have seen:
Horoscopes, Fortune-tellers, Magicians and a priest explaining the Genesis to the children.

Some things will never change.

Happy new year.

How to write in Japanese on Debian Squeeze and KDE

I think that maybe this is the simplest way to write in Japanese on my Debian box.

aptitude install ibus-anthy
You can install other input methods for other languages too.

Add the following lines toyour .bashrc
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

Launch ibus-setup from a shell, then configure the input methods and the other options. Logout from your graphical session and login again. You should be able to change the input method in your applications now.

Back to the fluxbox

At lest once per year there’s a moment when I start my fluxbox session instead of the usual kde one, and I begin to imagine how it would be cool to use fluxbox with a black and green theme, using only command-line-interface (cli) applications and just be a hopeless nerd.

The question is: can one use just a command line to do most the things he usually do? The answer obviously depends on what one wants to do.
This is the list of programs I usually use from a command line:
-Browser : w3m, lynx
-Instant Messaging : freetalk (xmpp), finch (everything else)
-Editor, programming : vim
-Players: mplayer
-Pdf: pdftohtml and w3m, or pdftotext.
-Downloading, torrent: aria2
-RSS feeds: canto
Notice that w3m can display images in a xterm terminal. I remember that I could even access gmail with w3m, but it seems that I can’t do it. The drawback is: no javascript, no flash (well, this might not be considered a drawback at all)
This will cover 90% of my common activities. I still need an email client, but I am working on it.

Fortran and binary files: sequential access

When you write a binary (FORM=’UNFORMATTED’) file using Fortran 90, you have two choices:
1. Sequential access
2. Random access (or direct)

I will talk about the first method because the second one is easier to understand and is better documented in the web.
In the first method your program will open a file to write a 4-byte integer which contains the length of the record (i.e. the length in byte of the pieces of memory that you are writing on the disk), then it will write the block of memory (i.e. the variable) that you put in the “write” statement and then it will write the same 4-byte header that it wrote at the beginning of the file. The block of data between the integers is called record.  In the following example we will write two arrays in the same file using just one record (each time you call the write statement you write a new record on the file)

implicit none
integer, parameter :: N=8
real*8,dimension(N) :: U,V
integer :: i

do i=1,N
U(i)=i
V(i)=i
enddo

open(unit=2,FILE=’data.bin’,status=’replace’, &
FORM=’UNFORMATTED’)
write(2) U,V
close(2)

Now by using a hexadecimal editor like bvi or hexedit one can see what has really been written:


80 00 00 00 00 00 00 00 00 00 F0 3F 00 00 00 00 00 00 00 40
00 00 00 00 00 00 08 40 00 00 00 00 00 00 10 40 00 00 00 00
00 00 14 40 00 00 00 00 00 00 18 40 00 00 00 00 00 00 1C 40
00 00 00 00 00 00 20 40 00 00 00 00 00 00 F0 3F 00 00 00 00
00 00 00 40 00 00 00 00 00 00 08 40 00 00 00 00 00 00 10 40
00 00 00 00 00 00 14 40 00 00 00 00 00 00 18 40 00 00 00 00
00 00 1C 40 00 00 00 00 00 00 20 40 80 00 00 00

Each couple of numbers is a hexadecimal conversion of one byte (8 bit) in the file.
First look at this block “80 00 00 00” which is written both at the bottom and at the top of the file. That is the 4-byte integer that contains the length of the record. We have used 2 arrays made of 8 elements 8 byte long. So we expect to read a decimal 2*8*8=128, that is a hexadecimal 80 (8*16^1 + 0*16^0), which is exactly what we read.
But it is not over yet.
Let us use longer arrays, N=42. In this case we would expect that the header contains the following characters: 02 A0, that is 2*8*42=672. But on your hex-editor you might find: A0 02 00 00.
That is because your system is using little-endian ordering (that is the least significant bit first). On other systems you might find a big-endian ordering (most significant bit first).

You can’t always get what you want, but sometime you can.

Vintage binocular you find in a loft
Thanks to apod I am developing an interest in astronomy, so I have been searching information on the web, particularly about cheap equipment to get started. Well, I have been really lucky. After I have spent the whole morning searching for a 10×50 binoculars I have discovered a thirty years old 10×50 fully coated Weber binoculars (proudly made in japan) in a loft, a most fortunate coincidence.
I am not an expert but it seems to me a good piece of equipment, I’ve tried to watch a grid on my netbook screen from a distance to search for aberrations but I have found almost none: the screen was still rectangular with an almost undetectable curvature, the grid inside the screen was perfect. Pointing it towards stars or planets, chromatic aberrations were minimal. Mars, Saturn and Venus were a remarkable sight. Tonight I will try to look at Jupiter, maybe this binoculars is sufficient to discern Callisto, which should be quite far from Jupiter tonight.

How many lights do you see? A trinity!

I recently saw a double episode of Star Trek TNG entitled: “Chain of Command“. In this episode Captain Picard is tortured by Cardassians and asked to tell that he see five light, though there are only four of them.This episode reminded me of 1984, by Orwell and the famous phrase: 2+2=5.
When I first read the book (and if you have not, do it now) I thought that was a silly method of torture. I mean, it does not cost anything to spell four letters… “five”. However with time I have understood that there is much more behind it. To admit that something you have always know it is true it is false, to bring yourself to the point that even your own eyes tell you that you see five fingers instead of four, that is the point where a man is totally annihilated.

Well, I’ve never understood the meaning of the trinity, but now I know. Tell me, how many gods do you see?

Monkey see monkey do

In the past three years I had the opportunity to observe the growth of a child, once in a month, so I did not become accustomed to his habits and the way he talks, but I could observe the progresses he made. Well, now I can tell that there is nothing in what he says or what he does that is original, nothing from his own. Every sentence he spell is a sentence he have taken from a cartoon, or an adult, or another child. He is just a cluster of memes. The only thing that changes with time is that it becomes more difficult to trace the source of the memes, because they grow in number, and similar memes melt with each other end eventually give birth to a new meme that another child is ready to receive.

I’m starting to believe that an intelligent being is just a biological or artificial device which has gathered a number of memes so big that it is almost impossible to distinguish the single meme and to trace its source, it is capable to reply to external stimuli he receives from its sensorial system and memes which it receives from other intelligent beings that posses an adequate network of memes.