Archive for January, 2009

proctitle: a new step for pinetd

Ever wanted to give meaningful names to your processes when you pcntl_fork() with PHP ? proctitle is the extension you’re looking for!
Adapted from bug report #29479 and code initially wrote by Midom for Wikipedia, the proctitle extension allows for a process to change its own displayed title in the system’s process list.

Is the ability to rename a process relevant to PHP? I’ll just say that an image is worth a thousand words…

Example of proctitle being used by pinetd

So, here it is, my good old PInetd project is soon under public beta (as soon as PHP 5.3.0beta1 gets out), and, I hope, will have people using it. PInetd is basically a framework for creating TCP, UDP or other kinds of daemons. It has a lot of features (internal IPC, fork, chroot() and setuid() helpers, process management, etc) and contains some example daemons (FTP, POP3, SMTP, DNS, HTTP, …). I think it may give ideas to a lot of people and open new possibilities for PHP.

Anyway, tonight’s goal was to make it easier to see what’s happening on pinetd without too much troubles, and allow display of some basic informations with some daemons (for example for FTPd, display name of file currently being downloaded/uploaded, etc). So, the proctitle extension is relevant to PHP!

You can get it via SVN: http://ookoo.org/svn/proctitle/ (tested with PHP 5.2.8 and PHP 5.3.0alpha3).

Tags: , ,

Gaza, Israël and all those things you hear on news

If you’re reading this blog, you probably also read news, and maybe you were there when I first talked about Gaza, Israël, and all those things you hear or read on the news.

So, you know the conflict is back, is now labelled as a war, and is going nicely since December 27th. Gaza keeps firing rockets and mortar on Israël, and Israël’s army keeps advancing in Gaza with the goal of stopping attacks.

Today, the number of casualties reached the value of 1000 death in Gaza (while it’s still written that this number is not confirmed by any external source, it still seems plausible).

Ok, so now I’ll provide answers for five questions I hear everyday, I’ll try to stay as impartial as possible, but since I have friends in Israël and I lived there for a few months, I might not be totally impartial. I’m warning you now, so you know in advance, and read this document while you know about this.

  1. Israël is killing, and keeps killing civilians, while Gaza/Hamas killed mostly military men.
    Technically, attacks against Israël is not done by an army, so attacking those people means you’ll end killing “civilians”. They are usually labelled “terrorists”, however you might want to think that the children/women killed were not all terrorists. You are probably right, but still again, when you have civilian-looking terrorists hiding in a civilian-looking place, it becomes quite tricky.
    Now, the amount of casualties is pretty high, while it seems attacks against Israël didn’t fall, so I believe lots of blood have been wasted there.
  2. Who is winning the war?
    In recent wars, the one who “wins” as you could think, is the one who gets attacked. As long as Israël is getting hit from Gaza, it can say there are “bad boys” there that needs to be punished, and keep attacking. The same is also true in the other side, as long as Gaza keeps being attacked by Israël, Hamas can continue firing rockets.
    The next point is making this sound better. You need quite a lot of marketting to make you looks like “the good guy” in a war. For now I’d say that Hamas looks like the “bad guy” because of previous marketting (labelled as a “terror organisation”, etc) while Israël started an all-out war, then gave some “bits” to show they are the “good guys”.
    Now, everything depends on your definition of “winning a war”, however nowaday, “winning a war” meaning having most other countries recognizing you as the winner.
  3. Why is the political pressure on Israël to stop the war having no effect?
    The fact USA is not following is having a strong impact against any attempt to stop the war. Hamas also showed they don’t want to stop the war at all costs by refusing the cease fire proposed one week earlier. I’ve also read in a previous article from BBC News that Hamas was “about to win the war”, and just needed a few more days.
  4. How could Hamas win the war?
    I personally believe the only way for Hamas to win against Israël’s well-trained army is to stop firing rockets. Any other kind of threat will cause a strong international reaction, and probably the apparition of other armies (I’m looking at America right now).
    If Hamas stops rocket firing, Israël’s army will have no more a valid reason for killing civilians, and will have to fall back and explain all deaths since the conflict started. Arrived at this point, rocket/mortar firing can resume for a few months before another military operation will be possible.
    Of course, that would require for Hamas to be able to pass orders, and its followers to accept such order. I don’t know how they are organised, but this kind of order is usually hard to accept.
  5. How could Israël win the war?
    A war against an ideology is not something you can win easily. I’m not even sure you can win at all.
    If you exterminate anyone following the ideoligy, you’ll be a “bad guy”. If you don’t, they’ll still taunt you.
    Currently, Israël seems to be taking the “average” route, by attacking “all out”, then opening things like a daily truce of a few hours, etc… They are maintaining publicity for the military operations this way, and keep attacking to try to demotivate attackers. While this will have an effect on most people attacking Israël, it’ll still have the reverse effect on some of them, who will begin/continue firing rockets and running operations against Israël.

So, are you saying this war has no permanent way of ending?

If you see any viable long-term option for this conflict, speak it out. I believe if an easy solution existed, it would already be found and applied, however things are not that easy.
Let’s remember that Israël is a country initially imposed on existing countries of the area in 1947 and declared its independence on May 14, 1948.
Of course, if at some point someone else told you you will have to share your hourse with someone else, you wouldn’t be really happy. That was the case for the countries located at the place which became the first Jewish state, and they showed it. In return Israël also attacked, and won more territories than initially planned.

Since those conflicts are barely 50 years old (and not all), the place is quite unstable, and wars are easily started. Everyone has a reason for fighting, however the context has changed. How your country is seen by other countries became important for international market, and as I previously said, the winner will be chosen for its marketting effort. Even countries like Notrth Korea did some (temporary) efforts to fix the way they were seen by other countries and try to resume commercial exchange with their neighbors.

Tags: , , , , , ,

GG.ST IRC Network

Thanks to some dudes in an american company, I finally could open an IRC network and get some funds to start with a nice domain. I spent more than 3 years waiting for the expiration of some kind of bounding paper, that was probably not legal (I believe you can’t have an anti-competition article without anything back, but I’m just too lazy to bring this to court, waiting 3 years clears this anyway) but is now over.

So, everyone is welcome on the newly born IRC Network GG.ST. This will remain some people of old times, when we were called something similar, and well, the idea is partially coming from there.

So, because of this unfortunate event 3 years ago, I became “potentially legally unable” to manage an IRC network for a duration of 3 years, and had to get other people manage/run/operate/etc… networks, as I could never leave IRC. I kept working on software for irc, but left my hands out of network management.

So, now that I’m back, time for some fun, and need to bring back some users. I’ll probably merge the existing MatrIRX project into pinetd2, by adding to pinetd2 some “protocol adapters” thanks to the new IPC structure of “ports” I recently added.
On a side note, pinetd2 should go on public beta near January 20th/22nd 2009, as PHP 5.3.0 should also go beta at this time. Good news for everyone waiting for this, and for Grepsd who’s currently working on some stuff for pinetd.

If you are interested into meeting me on IRC, you can join my personnal channel, even if you don’t have an IRC client (web interface).

Feel free to visit GG.ST’s home page too. I’m trying to get someone to do something nice with this page, it’s not even started yet, but should be done at some point in the future.

Tags: , , ,

Seven things – tagged by Mark Karpeles

Sometimes internet memes are something horrible. On PHP, right now, the whole idea is to share seven things about yourself (not things everyone knows about, it won’t be any fun), all of this because of Tony Bibbs (yes, it’s his fault, even if I don’t know him at all, he’s the one who started it all on the Who tagged who).

By the way I’ve been tagged by Mark Karpeles, myself. If you want to know why, you’ll have to read more.

For the people who don’t know me at all, I won’t eat you, you can come and try to talk to me. I started working on PHP’s WDDX extension (right now rewriting a part of it to use xmlreader instead of expat-like stuff) which was maintained by Andrei Zmievski (who wouldn’t have liked at all seeing the wddx functions assuming “everything is ISO-8859-1″, as he said before, “English is not the only language” and stuff like that).
Oh and now, I’m not using Coldfusion at all, I never touched Coldfusion, I use WDDX because it’s a nice serialization system, and because I got something to unserialize it on the other side.

  • Like Paul Reinheimer, I also do some photography.
    I like being able to take still images out of things I see in my daily life, and that’s what cameras are made for. Since I had the chance to travel around, I got a few pictures from other countries, and a few months ago I bought  a second hand Nikon D70s which helps a lot taking nice pictures.
  • I never finish anyth…
    In fact, sometimes, I happen to finish something, but “finishing something” is just too boring. I always do a new version at some point, so nothing is really “finished”. Just tag it with a version number and continue it (already got this thinkgeek tshirt).
  • My first computer was a Sinclair ZX Spectrum 128k +2.
    My mother was writing little games for me in BASIC, and I started BASIC quite soon. I knew almost every instruction in BASIC (was just missing arrays with DIM) and already started touching the ASM part with POKE, PEEK and USR before I was 7. When I was 8, I got an Amiga 500, quickly followed by an Amiga 2000, another Amiga 2000. Today I own two Amiga 1200…
  • During the Paris’ PHP Forum 2008, I showed Lukas Smith around (especially to find a nice place with better food than the forum’s sandwitches). That day I ate twice.
  • I fully speak and understand spoken French, English and Japanese (which I’m unable to write, and sometimes unable to read). I’m able to utter some words in other languages (the tourist survival base) in Italian, Spanish, German, Hebrew, Russian, Latin and some Chinese. I love travelling, and I even went to Tel Aviv (Israël) during my PHP training (hey, PHP3 is from there).
  • I’m geek. And not half, as I even been featured in a documentary called “Suck my Geek“. While I’m mainly a computers geek, I also do common stuff like watching japanese animation (I learnt Japanese from there), replying to “seven things” extraweb memes, troll by using non-existant words, etc…
    Being geek also implies being curious. While I never finish anything, I started a lot of things, including an OS project, a xinetd-like program in PHP, a BitTorrent client in PHP using PHP/GTK, IRC bots with PHP (MatrIRX), an IRC daemon in C++, and even more useless things than that. Most of them aren’t documented (I’m not a documentation guy, it was hard to write, it must be hard to use… isn’t it?) but are working, and some of them are even actively developed (I recently got a guy who decided to work on some things for pinetd).
  • I make apple pies.
    Not apple pies like the ones you’re used to eat. My apple pies are uniques. If you ever come to Paris, message me before so I can prepare one and let you take a bite. My apple pie follows a receipe I got from my mother, who got it from my grand-mother, etc… Even people who usually don’t like apple pies came to eat some and liked it.

Now, the people I would want to know more about are:

  • Lukas Smith – a great guy who helps PHP from the shadows
  • Zak Greant – Foo Associates (I really like this name)
  • Andrei Zmievski – who initially wrote ext/wddx
  • Pierre-Alain Joye – who helped me a lot on the PHP channel
  • Christophe Robin – alias BombStrike, who has no blog as of today (not yet?)
  • Derick Rethans
  • Mark Karpeles – because nobody tagged me yet, and because I felt like some recursion would be fun (wonder how it’ll work for the “who  tagged who” page)

And finally some rules:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post – some random, some weird.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

Tags: , ,

Snow in Paris

Guess how I was surprised seeing Paris with a white (and really light) mantle…

Tags: , , ,