Friday, August 25, 2006

Pointer to Function vs Pointer to Data

From http://www.opengroup.org/onlinepubs/009695399/functions/dlsym.html:

--- start ---

The ISO C standard does not require that pointers to functions can be cast back and forth to pointers to data. Indeed, the ISO C standard does not require that an object of type void * can hold a pointer to a function. Implementations supporting the XSI extension, however, do require that an object of type void * can hold a pointer to a function. The result of converting a pointer to a function into a pointer to another data type (except void *) is still undefined, however. Note that compilers conforming to the ISO C standard are required to generate a warning if a conversion from a void * pointer to a function pointer is attempted as in:

fptr = (int (*)(int))dlsym(handle, "my_function");
--- end ---

Hmm...

Hmm...

Hmm...

So that's why they do it like this:


* (void **) (&fptr) = dlsym(handle, "my_function");

me, on learning how to load a library ...

and the really funny thing:
I was actually searching first to linux kernel code to learn how they did module load/unload, before resorted to dl*() family of functions...

Poor me.

Friday, August 18, 2006

Merdeka!

Setting tahoen 1945.

atau 05, sebagaimana tercantum dalam teks asli proklamasi,
yang aku baru ngeh lagi kemarin, ketika mengikuti (dengan khidmat dong) peringatan detik-detik krusial itu kemarin.

Rakyat mendengarkan dengan khidmat, harap-harap namun bukan cemas, sesuatu yang lain yang dirasakan, bulu kuduk tidak mau kalah unjuk diri, menegaskan rasa itu. Merinding.

Soekarno pelan dan penuh ketegasan mengucapkan bait-baik teks yang disusun malam sebelumnya. Hatta dekat berdiri dibelakangnya.

Mungkin tak ada yang tahu bagaimana hari-hari berikutnya akan dilalui. Mungkin pula saat itu tak ada yang begitu memperdulikannya. Rasa haru dan bahagia terlalu dalam. Mengaburkan rasio.

Ketika teks selesai dibacakan, rasa yang terpendam pun meluap, memuncak, membuncah. Semua berteriak.

Merdeka!

---

Setting tahun 2000.

Aga lahir.

Negeri tempatnya lahir, berkubang dalam sengketa.
Sengketa berdarah antar saudara.
Mempertanyakan makna kemerdekaan.

Jika merdeka, mengapa menderita?
Jika merdeka, mengapa terkungkung?

tertekan. ditekan.

Tak bebas mencari makna hidup.
Tak bebas mengikuti langkah angin.
Terbelenggu.

Maka Aga pun Mahardika.

---
Setting tahun 2006.

Merdeka-pun mendua.
Sebagian terkekang karenanya.
Mungkin karena sadar bahwa Merdeka itu belum.

Sebagian, menari dalam setiap langkahnya.
Merasa bebas. Seperti angin. Tanpa batas.
Bebas tanpa arti. Mungkin juga tanpa isi.

Tidak sadari, bahkan angin pun mengikuti aturan-Nya.

Friday, August 04, 2006

A War on Stupidity and Arrogancy

Seen on planet debian (from: http://www.advogato.org/person/vorlon/diary.html?start=17):

On foreign policy

When you defend the death of a civilian
and say
he should have known better
he should have left his home
and his life
in the land of your enemy
that is hate.

When you say the boy's death was justified,
for daring to be born in that country
with such people
and such policies
it is because you hate.

When the war comes to your town
and you are caught in the cross fire,
I too will say,
you had it coming.

---

What more we can say?

I'm hereby declaring a war on stupidity, ignorancy, and arrogancy shown by Israel and America, winners of the Stupid and Arrogant Goliath of the century award.

I do realize that there still exists many smart, sightful people with conciousness on both countries, to them I offer my condolences for being intellectually impotent, though that may not be by their own will.

And this war is not limited to those countries, but also to others who shows that kind of stupidity, ignorancy and arrogancy.