Casablanca, Morocco

After only ten days…I have left Italy again for another country: Morocco.
I’ll be here for the next 4 months to work at the Casablanca Ubisoft office.

Before entering in Morocco we have to answer to some questions. Before entering in Morocco we have to answer to some questions: why you are here? You are a terrorist? And so on…
Palm trees at the Casablanca Airport Palm trees at the Casablanca airport…I took a picture of a cop while he was doing a fine to an italian car…but here we can’t take pictures (because terrorism) so i had to remove it from my camera.
I’m here for not even one hour and they already know me…LOL
Mmm...something is telling me it will be funny... Advertisement at the airport…mmm…something is telling me talking here will be funny :D
My home for the next months... My home for the next months. Company has given us a car too, the one in the picture.
Dinner with Camille, Yacine and Damianji (in the picture) and Pier. Dinner with Camille, Yacine and Damianji. Pier took the picture.
Pier and Damianji are playing with X-Box...yes...our is an hard work! Pier and Damianji are playing with X-Box. Damianji has to train for the course in Paris…yes…Game Design is an hard work! :P
Dinner at the Caffe Mauri...the best almond juice in the world! Dinner at the Caffe Mauri…the best almond juice in the world!
Unbelievable!! Here they still sell PC Olivetti!! Shopping at the Marjan mall….what? Unbelievable!! Here they still sell Olivetti PCs!!
Hassan II, the second biggest mosque in the world Hassan II, the second biggest mosque in the world.
Inside the mosque In the mosque’s square…only muslim people are allowed to enter inside.

From Santiago to Finisterre, Costa de Morte

At the end, the last step…

Only 87.6 Km to Finisterre…easy, after 777 Km! :P
Santiago and the Cathedral in glory
With Carlo from Florence (next to me) outside the albergue of Olveiroa.
Finally the ocean!!! WOW!!!
Swimming in the ocean!! Yeah! Freedom!!
Mmm…i know this guy! :P
Only 1 Km to walk…the lighthouse is near!
0.00 Km
Burning the clothes used during the walking…I feel ligther :P

Now it’s time to come back home…more wise? I don’t know…probably more older, but:

“It’s not the years, honey, it’s the mileage.”

Dott. Jones…now i know that it’s fu**ing true!!! :P

Finally…arrived!!!!

Yesterday morning i finally arrived in Santiago…now all is more clear :P

Next step…Finisterre…the end of the ancient Camino…stay up!

Many pilgrims…one way

I arrived today in Melida…remain only 50 Km to Santiago and i begin to be a bit tired… :P
Here some photos of some pillgrims i met during the walking.
I want to say them a big “Ciao” !!

P.S. François, where are you ??? :D

With the hospitaleros of the italian albergue

Arrived in Belorado…232 Km done!

Hi! It is not easy to find an Internet point with an USB connection…but finally i found one! :)
The walking is beatyfull and i’m meeting people from all the world…Here some photos…stay up for next update! :D

Partenza da St. Jean Pied de port!
Neanche la pioggia ci ferma!
Riposo fra le pecore...
Albergue di Najera

Inizia il viaggio!

Finalmente è giunto il momento!
I biglietti sono stati fatti, lo zaino è pronto…le gambe pure (per adesso).

Prima tappa: Il Duomo di Pistoia dove, nella Cappella del Crocifisso, si trova un frammento osseo del cranio di San Giacomo (o più precisamente un pezzetto di apofisi mastoidea, come direbbe il mio amico Dott. Caini).

Da Pistoa nel Medioevo si dice che partisse il cammino dei Cavalieri alla volta di Santiago, pertanto ho deciso anche io di partire da questa città. Farò in treno il tratto da Pistoia a Saint Jean Pied de Port, dove inizia il cammino a piedi vero e proprio.

La storia del ritrovamento del corpo di San Giacomo è molto bella, ne includo la parte principale, presa dal libro “Cammino di Santiago” delle Parrocchia San Michele Arcangelo:

Dice la tradizione che un eremita di nome Pelagio (uomo del mare), che viveva in un luogo chiamato Solovio (attualmente sede della chiesa di San Fiz de Solovio, nell’attuale Santiago de Compostela), osservò durante numerose notti, nel bosco di Libredón, delle luci nel cielo, simili a stelle cadenti, che rischiaravano un punto preciso del bosco (anno 813). Quella stella rivelatrice e artefice del ritrovamento della tomba di San Giacomo, diventerà un’altro dei simboli legati all’Apostolo ed al suo culto. Ma non si trattò di una semplice pioggia di stelle, la rotta del Cammino di Santiago è impressa da sempre nella volta celeste ed è nota col nome di Via Lattea. Per questo motivo, il cammino che porta alla città di Santiago è detto anche “Cammino delle stelle”.

Da qui il nome Santiago de Compostela, cioè San Giacomo del Campo di Stelle.

Bon! Si parte!


All the times that I’ve cried
Keeping all the things I knew inside
And it’s hard, but it’s harder
To ignore it
If they were right I’d agree
But it’s them they know, not me
Now there’s a way and I know
That i have to go away
I know I have to go

(Cat Stevens, Father and Soon)

First Sms Post

If you see this post, then it works! Hello World!

PyconDue

Just returned from PythonDue, the second italian conference about Pycon. Guest of honor Richard Stallman, pardon, Sant’IGNUzio :D

Richard Stallman Sant\'iGNUzio

Fede & Ganesh

Journey at Como’s Lake

Some photos from my journey. As you can see the lake and the nature are very beatyfull…Great place to live!!

How to reverse a string in C without using temporary variables?

Some days ago I have had to resolve (but i have not :( ) a likeable optimization problem about strings in C. The problem is:

Given the function:

void reverse(char* str, int len)

that reverse the string pointed by str with length len, is possible to implement this function without using anymore temporary variables?

As example:

if the original string is “Hello World!”, the reversed string is “!dlroW olleH”.

Obviously it’s a student exercise and the cases where a real programmer would do such a thing are probably quite rare. However…let’s go!

First, we can implement the function using only one temporary variable, temp for swapping:


void reverse(char* str, int len)
{
char temp;
while (--len >= 0)
{
temp = *str;
*str = str[len];
str[len] = temp;
str++; len&#8211–;
}
}

Practically, we use two indexes to scan the string: with the first, we scan the string from left to right while, with the second one, from right to left. Each time we swap the characters at the positions defined by indexes.

But we can also do better! temp can be omitted if we use binary operator XOR. Magically:


void reverse(char* str, int len)
{
while (--len >= 0)
{
*str ^= str[len];
str[len] ^= *str;
*str ^= str[len];
str++; len&#8211–;
}
}

So, we have implemented a string reverse function without any temporary variables. I think this is the better optimization, let me know if anyone can do better.

WordPress Themes