Skip to main content.


This is the archive for June 2009

Saturday, June 27, 2009

An example of fuzzy logic constructs applied to everyday life

This morning, my wife asked to me...

- Dear, when are we going to have shopping at the mall?
- Later.
- ... What do you mean with "later"?
- Uhm... "not now".

After she recovered from the shock, I explained to her the notion of fuzzy logic variable and fuzzification...

Friday, June 19, 2009

Falcon 0.9.2 is ready to be released, so I am exploring what to do next. Our plan was that of starting optimization since the first official release of Falcon, and we can really get big improvements in that area.

With this in mind, I started to search for a portable way to perform atomic operations.
I found some very interesting resources. With just this information and good inline wrappers, it is possible for Falcon engine to expose a cross platform atomic API which can be extremely good for multithreading. Many MT-sensible operations, as the GC block allocation and scan loops, has been designed with atomic operations in mind (in the sense that although implemented with mutexes, they are based on structures that are thought for atomic operations), and so using atomic operations there can be both simple and rewarding.

Some resources we'll be using:
A nice article on using GCC 4.1 portable atomic primitives.
GCC Docs on that.
MacOSX multithreading guide, with native CAS support operations.
MS-Windows Interlocked SDK
On SUN, there's a mysterious __rwstd::Interlocked* function set that I will investigate more.
Also, Sun C++ supports __thread keyword as gcc, which is much more efficient than functions accessing the thread local stack as TlsSetValue or posix_set_specific.

Wednesday, June 17, 2009

I am reading some essays on the "Man'yo shuu", a compilation of 10,000 poetry slices from ancient Japan. Today, I have stumbled on a poetry that deeply impressed and moved me, so I want to share it. This is from a priest of the Gengouji temple in ancient Nara, filed as n. 1018. The most common poetry form in the Man'yo Shuu is the tanka (5-7-5-7-7), but this is a 5-7-7-5-7-7 form called Sendaika (revolving theme poetry).

Shiratama wa
White pearls...
Le perle più preziose...

hito ni shiraezu
are unknowable by the many.
sono inconoscibili alle genti.

shirazu to mo yoshi
If they don't know, then fine!
Ma anche se non le conoscono, sta bene.

Shirazu to mo
Even if they don't know
Anche se non mi conoscono

wareshi shireraba
just, if I am able to know my true self
se almeno io so conoscere il vero me

shirazu to mo yoshi
if they don't know, then fine!
Anche se non mi conoscono, sta bene.

This poetry is really outstanding in the Man'yo Shuu. It breaks almost any rule, respecting just the sendaika metric, which is uncommon by itself. There are poetry with repetitions, but repeating a whole verse is quite "daring" alone; the doubling of the repetition with the second 5 syllable verse makes this even more daring. Then, this poetry talks directly of a personal feeling, it's very intimate and warm; no metaphors and just no parallels with the surrounding natural environment. It's just as it is.

And mostly astonishing, while this poetry is 1300 years old, except for shireraba, now spelled as shirareba, and the term wareshi that sounds quite old, it uses words and grammatical forms that are absolutely still used today. It's a message that traveled through more than a thousand years, with its emotional charge still powerful as the day it has been written.

I wish I was able to reach this same detachment and self-completeness.

Monday, June 08, 2009

The Pirate Party, that is fighting for a reform of the copyright laws across Europe, has achieved an astonishing 7,1% votes in Sweden, and has gained a seat in the European Parliament.

I want Sweden citizenship.

Or I may open a local branch :-)