Skip to main content.


This is the archive for July 2009

Saturday, July 25, 2009

I just discovered that Sun Studio has a strange idea of "optimization" when it comes to copying structures by value.

Wednesday, July 15, 2009

My wife asked to me: "Dear, can I make an intelligent question to you?"

And I: "Sorry, darling, I don't have so much time..."

(At times I wonder how is she able to bear with me...)

Thursday, July 09, 2009

--- What's the sound of a computer being shut down in a desert office?

Sunday, July 05, 2009

Looking back a bit in my blog, I found out that it's been a while since I translated some Japanese song. This week, I bought the last album of Shikata Akiko, "Harmonia" and it's definitely fascinating. On the CD leaflet, she writes "There's a rhythm floating in the soul of this planet shining of its life", and that's the introduction of one of the most ambitious projects ever undertaken by a musician. I have not the talent to say if she succeed or not, but for sure, listening all the songs from the first to the last, you can tell a story of nature, mankind, hope, despair, darkness and light.

The last song of the album, "Harmonia", is the synthesis and conclusion of the work. That song is "all". I couldn't fit it in a frame, because its everything the music has produced up to date. It's lyric, and epic, yet simple and warm. It has some Arabian music remembrance, but it sticks with European traditions, it's Celtic and Gypsy, it's classical and modern, it remembers centro-american popular songs, and has something vaguely African. You could add a Dijeridoo in the frame, and it would be just perfect. And of course, it's so Japanese...

The lyrics are possibly not outstanding poetry, yet they fit the frame so perfectly; they are just telling you what the music is already telling, in another language. This song is not just words-over-music, or music-over-words as sometimes happens. It's words-and-music.

Saturday, July 04, 2009

GD2 is a very cute library, and a must have for site developers (very used in PHP and perl....). As it is a very clean C library, with a very object-oriented spirit (despite it's plain C), It's the first target for the new Falcon automatic binding generator. The only problem is that it uses ANSI C FILE* streams to read and save images. It has actually also the ability to load from buffers, but providing a direct mapping is definitely a plus.

On Unices, that's not a problem. dup() + fdopen() provide a direct way to form an ANSI C FILE stream out of the system stream ID which I use in Falcon::Streams. On windows, I use System HANDLE (CreateHandle &c) to drive the Falcon::Streams.

But I found this snippet:


HANDLE hFile = CreateFile(...);
int handle = _open_osfhandle((LONG)hFile, _mode);
FILE* f = fdopen(handle, szMode);

With this, I can virtualize a function down in the Stream falcon class returning an integer system stream or raising an error if the stream isn't mapping a system file (i.e. streams can be net-bound or memory bound). The GD binding will have to wait the next version of falcon to use Stream oriented load/save functions, but I should release that next version quite soon.