<?xml version="1.0"?>
<rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:blog="http://bitflux.org/doctypes/blog" xmlns:php="http://php.net/xsl" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:georss="http://www.georss.org/georss" version="2.0"><channel><title>In Golgota</title><link>http://golgote.freeflux.net/blog/</link><description>Cocoa, PHP and random thoughts</description><generator>Flux CMS - http://www.flux-cms.org</generator><item><title>On the move</title><link>http://golgote.freeflux.net/blog/archive/2008/06/06/on-the-move.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/110/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;There was recently an &lt;a href="http://steve-yegge.blogspot.com/2008/05/dynamic-languages-strike-back.html"
    &gt;interesting post about scripting languages&lt;/a&gt; by Steve Yegge. What I particularly liked are the hints on other languages he gives and his invitation to try new languages.&lt;/p&gt;

&lt;p&gt;I have been programming PHP since 1999 and felt a need to learn something new approximately when they launched Rails a few years ago. But instead of learning Rails, because I don't usually follow the hype, I decided to learn Python.&lt;/p&gt;

&lt;p&gt;So, recently, I have been learning Python, then Ruby and now the Lua programming language. Out of these three languages, my favorite is Lua and it is where I spend most of my time now.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://golgote.freeflux.net/files/images/blob.jpg"
     alt="PHP blob"
     style="float: left;"
    /&gt;They are all excellent languages to learn and in many ways, they are better than PHP. As I said in a previous post, I now see PHP as a big blob which along the years have been developing in too many directions and is now facing a lot of problems because a lot of things were implemented incorrectly and were not carefully planned. It is not obvious at first, but when you start looking at other languages, you understand how some things could have been done and you realize how wrong they are in PHP. I am thinking of all the stuff you find in SPL, create_function(), call_user_function(), ::, $this-&amp;gt;, parent::, instanceof, is_a(), the way static are handled, etc, etc. It's all a mess. And it starts to look in blog posts. From time to time, I read things about how nice it would be to have &lt;a href="http://steike.com/code/php-closures/"
    &gt;closures&lt;/a&gt;, &lt;a href="http://pooteeweet.org/blog/0/1006#m1006"
    &gt;traits&lt;/a&gt;, &lt;a href="http://fr3.php.net/manual/en/function.create-function.php#70691"
    &gt;anonymous functions&lt;/a&gt;, &lt;a href="http://bugs.php.net/bug.php?id=33595"
    &gt;weak references&lt;/a&gt;, &lt;a href="http://php100.wordpress.com/2008/06/05/duck-operator/"
    &gt;duck typing&lt;/a&gt; in PHP and some hacks on how to imperfectly implement them.&lt;/p&gt;

&lt;p&gt;And because PHP is not idiot proof, you will find a lot of people there with little knowledge about programming. Like this week's post of someone who says "&lt;a href="http://brian.moonspot.net/2008/06/05/in_array-is-quite-slow/"
    &gt;function in_array() sucks because it is slow&lt;/a&gt;"... The more I know about programming and the less I find the PHP community interesting. It's like all the interesting people here are doing things secretly and don't take the time to share their experiences (unless they write books).&lt;/p&gt;

&lt;p&gt;And the last things I have started to dislike is the way a company like Zend is taking over the language. I have also recently very much disliked Oracle buying InnoDB and Sun buying MySQL, although I was not surprised for MySQL given the road they had taken lately, which is actually a lot like the road PHP is taking with Zend at the moment. With rumors about Microsoft, Oracle, IBM buying Zend, I start to feel the fear. Because in the end, who decides what goes where in PHP core?&lt;/p&gt;

&lt;p&gt;Here is a list of programming languages that  deserve a look soon:
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.scala-lang.org/"
    &gt;http://www.scala-lang.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.digitalmars.com/d/"
    &gt;http://www.digitalmars.com/d/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.haskell.org/"
    &gt;http://www.haskell.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.iolanguage.com/"
    &gt;http://www.iolanguage.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nice.sourceforge.net/"
    &gt;http://nice.sourceforge.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://boo.codehaus.org/"
    &gt;http://boo.codehaus.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.squeak.org/"
    &gt;http://www.squeak.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www-sop.inria.fr/mimosa/fp/Bigloo/"
    &gt;http://www-sop.inria.fr/mimosa/fp/Bigloo/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.erlang.org/"
    &gt;http://www.erlang.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;




 </content:encoded><dc:subject>Php</dc:subject><dc:subject>Lua</dc:subject><dc:creator>golgote</dc:creator><dc:date>2008-06-06T09:09:09Z</dc:date></item><item><title>Recursive copy with pattern match on Unix</title><link>http://golgote.freeflux.net/blog/archive/2007/08/15/recursive-copy-with-pattern-match-on-unix.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/107/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;For a new online shop I am working on, I needed to copy all the products images from the old site to the new one. The challenge is that both sites don't run on the same server and a product can have multiple images which are stored in different subdirectories. Furthermore, I am not interested in copying thumbnails since those will be regenerated with better quality and probably different format.&lt;/p&gt;



&lt;p&gt;In order to perform such a copy, recursive and using a filter, here is &lt;a href="http://www.mcwalter.org/technology/shell/recursive.html"
    &gt;what I found on the net&lt;/a&gt;:&lt;/p&gt;



&lt;code&gt;
$ tar -cf - `find . -name "*_xl.jpg" -print` | ( cd ../dest  tar xBf - )
&lt;/code&gt;

&lt;p&gt;This will recusively copy all my *_xl.jpg files into a ../dest directory, while also creating the subdirectories when needed. Perfect !&lt;/p&gt;


</content:encoded><dc:subject>Linux</dc:subject><dc:creator>golgote</dc:creator><dc:date>2007-08-15T09:07:13Z</dc:date></item><item><title>Lpdf on Mac osx</title><link>http://golgote.freeflux.net/blog/archive/2007/08/09/lpdf-on-mac-osx.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/103/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;Here is a quick reminder on how I built &lt;a href="http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/"
    &gt;Lpdf&lt;/a&gt;, the Lua bindings for pdflib, on my Intel mac.&lt;/p&gt;


&lt;ul&gt;
	&lt;li&gt;1. First, installed the PDFLib binaries&lt;/li&gt;

	&lt;li&gt;2. Installed Lua from source&lt;/li&gt;

	&lt;li&gt;3. Didn't bother about the Makefile in Lpdf&lt;/li&gt;

	&lt;li&gt;4. Used the following sequence&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;
export MACOSX_DEPLOYMENT_TARGET="10.3"
gcc -I/usr/local/include -Wall -O2 -fno-common -c
     -o lpdf.o lpdf.c
gcc -Wall -bundle -framework Carbon
     -undefined dynamic_lookup -o pdf.so lpdf.o 
     -L/usr/local/lib -lpdf
&lt;/pre&gt;

&lt;p&gt;At first, I forgot the &lt;em&gt;-framework Carbon&lt;/em&gt; flag which lead to &lt;strong&gt;dyld: Symbol not found: _FSPathMakeRef&lt;/strong&gt;.&lt;/p&gt;

</content:encoded><dc:subject>Lua</dc:subject><dc:creator>golgote</dc:creator><dc:date>2007-08-09T12:18:18Z</dc:date></item><item><title>Service des urgences, H&#xF4;pital Trousseau, Paris</title><link>http://golgote.freeflux.net/blog/archive/2006/11/20/service-des-urgences-hopital-trousseau-paris.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/96/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">Ce samedi, notre petite fille de 20 mois a &#xE9;t&#xE9; malade. 40 de fi&#xE8;vre, elle avait du mal &#xE0; tenir debout, ce qui &#xE9;tait particuli&#xE8;rement inqui&#xE9;tant &#xE9;tant donn&#xE9; son habituel enthousiasme pour l'action. Vers 10h, elle se plaignait beaucoup, mais impossible de savoir ce qui n'allait pas, jusqu'&#xE0; ce qu'elle renvoie enti&#xE8;rement son petit-d&#xE9;jeuner sur le tapis.&lt;br/&gt;
&lt;br/&gt;
Inquiets, nous avons d'abord tent&#xE9; d'appeler un p&#xE9;diatre, puis un g&#xE9;n&#xE9;raliste, inutilement, ils ne travaillent pas le samedi. Nous avons donc appel&#xE9; les services d'urgence pour une consultation &#xE0; domicile. 3 heures plus tard, le m&#xE9;decin &#xE9;tait l&#xE0; et nous a conseill&#xE9; d'emmener notre fille &#xE0; l'h&#xF4;pital Trousseau directement aux urgences, un h&#xF4;pital sp&#xE9;cialis&#xE9; pour les enfants.&lt;br/&gt;
&lt;br/&gt;
A 15 heures, nous &#xE9;tions dans la salle d'attente de l'h&#xF4;pital, avec six autres familles et leur enfant malade. L'inscription sur la liste d'attente s'est faite rapidement.&lt;br/&gt;
&lt;br/&gt;
Le lieu lui-m&#xEA;me est v&#xE9;tuste et sale, le plafond est noir de crasse et on se demande si les chewing gums coll&#xE9;s sous les bancs seront encore l&#xE0; dans 100 ans. Les toilettes sont aussi sales que celles d'un stade de foot, on peut m&#xEA;me voir des traces d'excr&#xE9;ments sur l'interrupteur. Il y a des jeux pour les enfants accroch&#xE9;s aux murs, mais les traces noires indiquent qu'ils ne sont pas non plus nettoy&#xE9;s r&#xE9;guli&#xE8;rement. Bref, c'est d&#xE9;gueulasse.&lt;br/&gt;
&lt;br/&gt;
Heureusement que notre fille, avec ses 40 de fi&#xE8;vre, ne pouvait pas courir partout comme elle le fait d'habitude. Elle est rest&#xE9;e bien sagement, &#xE0; moiti&#xE9; amorphe, sur les genoux de sa tendre maman en prenant son mal en patience.&lt;br/&gt;
&lt;br/&gt;
Et de la patience il en a fallu car le personnel de ces urgences apparemment compos&#xE9; aux deux tiers d'&#xE9;tudiants a s&#xFB; d&#xE9;montrer son incomp&#xE9;tence. Ils ont commenc&#xE9; &#xE0; ausculter notre fille vers 17h. Ils ont tout de suite pens&#xE9; &#xE0; une infection urinaire, ce qui est probablement l&#xE9;gitime. Il a donc fallu attendre que notre fille urine dans un sac, ce qu'elle aurait probablement fait plus rapidement si on lui avait propos&#xE9; de l'eau. Mais de l'eau &#xE0; l'h&#xF4;pital Trousseau, il n'y en a point. Du moins en libre service. Heureusement, il y a un distributeur payant &#xE0; l'ext&#xE9;rieur, 1 euros 50 la bouteille d'&#xC9;vian. Pr&#xE9;voyez de la monnaie.&lt;br/&gt;
&lt;br/&gt;
La petite commission faite, il est d&#xE9;j&#xE0; 18 heures. Envoi donc au labo pour analyse. Une heure et demi plus tard, retour d'analyse: les &#xE9;chantillons d'urine sont troubles, impossible de donner un r&#xE9;sultat. Ok, super, merci bien. Notre fille a toujours 40 de fi&#xE8;vre, elle s'est endormie sur le banc. On vient la r&#xE9;veiller pour lui faire une prise de sang. Elle n'a rien mang&#xE9; depuis plusieurs heures. Je vais acheter des madeleines au distributeur payant, c'est le seul type de nourriture &#xE0; peu pr&#xE8;s adapt&#xE9; aux petits enfants dans leur distributeur d'h&#xF4;pital pour enfants.&lt;br/&gt;
&lt;br/&gt;
La prise de sang est faite par une personne qui a l'air plus comp&#xE9;tente et inform&#xE9;e que les autres. Pour gagner du temps, et puisqu'il faut aussi refaire une analyse d'urine, ma fille a droit &#xE0; un sondage de la vessie, qui malheureusement ne donne aucun r&#xE9;sultat, pas d'urine trouv&#xE9;e, d&#xE9;sol&#xE9;.&lt;br/&gt;
&lt;br/&gt;
Hop, je retourne acheter une bouteille d'eau au citron cette fois, &#xE7;a passe mieux. Une heure et demi plus tard, toujours pas de pipi, mais une infirmi&#xE8;re vient nous voir et nous dit que les r&#xE9;sultats de la prise de sang ne montrent pas de signes d'infection urinaire. La fi&#xE8;vre est selon elle probablement d&#xFB;e &#xE0; un autre virus qu'elle aurait attrap&#xE9;e dans la salle d'attente du p&#xE9;diatre que nous avons consult&#xE9; pour son angine. N'est-ce pas le comble de l'ironie ?&lt;br/&gt;
&lt;br/&gt;
Nous pouvons donc rentrer &#xE0; la maison sereins et contents de la journ&#xE9;e pass&#xE9;e &#xE0; l'h&#xF4;pital Trousseau. Heureusement, il n'est que minuit et il y a encore des m&#xE9;tros &#xE0; cette heure.&lt;br/&gt;
&lt;br/&gt;
J'esp&#xE8;re que la r&#xE9;novation de cet h&#xF4;pital permettra d'am&#xE9;liorer les conditions d'accueil des enfants qui sont les premi&#xE8;res victimes du manque d'hygi&#xE8;ne, de comp&#xE9;tences, d'attention qu'offre cet h&#xF4;pital aujourd'hui. En attendant, pr&#xE9;voyez avant de vous rendre l&#xE0;-bas : de la nourriture, de l'eau, un moyen de transport, des jouets, vos propres m&#xE9;dicaments (personne ne nous a donn&#xE9; de Doliprane), un livre pour l'attente, une couverture pour votre enfant s'il veut dormir (11 heures, c'est long).&lt;br/&gt;
&lt;br/&gt;
</content:encoded><dc:subject>General</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-11-20T14:33:52Z</dc:date></item><item><title>Stop stealing, innovate</title><link>http://golgote.freeflux.net/blog/archive/2006/06/21/stop-stealing-innovate.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/90/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;Today I saw this &lt;a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Html+Proposal"
     title="Zend_Html_Proposal"
    &gt;proposal&lt;/a&gt; for the Zend Framework. I wouldn't be surprised if this proposal was accepted. Zend Framework seems to be unable to propose anything innovative to PHP developers. The examples provided on this page look like they are copy/pasted from code available in PEAR that already is 5 years old.&lt;/p&gt;

&lt;p&gt;I think Zend as a software company has a real problem with innovation. Not surprisingly, PHP suffers the same problem. Most of (if not all) the new features are stolen from Java, C, C++, PERL, ... but nothing seems to be invented here anymore.&lt;/p&gt;

&lt;p&gt;Of course, I think html_QuickForm2, the project we have been starting to work on will be a lot more interesting than these Zend_Framework proposals. It will be invented here and it will stay in PEAR. PEAR is where the innovation is. Zend_Framework is just, well..., a framework ?&lt;/p&gt;
</content:encoded><dc:subject>Php</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-06-21T19:05:24Z</dc:date></item><item><title>My experience with Python</title><link>http://golgote.freeflux.net/blog/archive/2006/05/26/my-experience-with-python.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/85/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;During the last 5 months, I have been learning Python. I read a few books about the language and subscribed to various mailing lists, RSS feeds and followed Open-Source projects.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Learning Python was easy and interesting. My experiences with programming languages so far have been mostly with PHP (since 1999), Objective-C, some C, Javascript and Actionscript for Flash. So I was at ease with Python and everything seemed well thought and designed.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Compared to PHP, &lt;strong&gt;Python is pretty&lt;/strong&gt;. Even the syntax is prettier. The obligatory code indentation is in my opinion an excellent idea to make sure your code is readable and respects some coding standards. Compare this with the code you can find in PHP apps libraries where each script has its own way...&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Python seems to have been thought from the start. On the other hand, features were added to PHP one after the other in order to "&lt;em&gt;solve the web problem&lt;/em&gt;". So compared to Python, PHP looks like an ugly fat blob. It borrowed from C, Perl, Java, C++... In comparison, Python looks more like a nice girl in a pretty dress. But as Rasmus Lerdorf said, PHP was never designed to &lt;a href="http://www.oracle.com/technology/pub/articles/php_experts/rasmus_php.html"
     title="Do you PHP ? Rasmus interview on OTC"
    &gt;win a beauty contest&lt;/a&gt;.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;I started learning Python mostly because &lt;strong&gt;I was getting bored with PHP&lt;/strong&gt;. I write PHP code almost every day, 10 hours a day, so I wanted to try something new. I had to do it on my extra time since PHP is our language of choice at work. I picked Python instead of Ruby because I didn't want to follow the hype around Rails. I was also interested in projects like Python for &lt;a href="http://www.forum.nokia.com/python"
    &gt;Series60 from Nokia&lt;/a&gt; and &lt;a href="http://pyobjc.sourceforge.net"
    &gt;pyObjC&lt;/a&gt;, a bridge between Python and the Cocoa framework.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;As my work consists mainly in writting web application, my first attempts with Python were to see if I could also use it for the web. Well, the answer is not definitive but it's closer to no. &lt;strong&gt;Python is not ready for the web&lt;/strong&gt;. The community is working hard on &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=146149"
     title="Guido van Rossum's post about Python web frameworks"
    &gt;web frameworks&lt;/a&gt; but they go in every directions and none of them is well tested. And none of them is near PHP in terms of ease of use, features and deployement options.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Still, I really wanted so I picked up a simple web framework called &lt;a href="http://wsgiarea.pocoo.org/colubrid/"
    &gt;Colubrid&lt;/a&gt; and tried to find a template engine that would fill my needs. In the past I have been using &lt;a href="http://pear.php.net/package/html_Template_Sigma/"
    &gt;html_Template_Sigma&lt;/a&gt; and was after something as simple. Well, without success. There are a lot of template engines in Python but they are either too big and do easy thing the hard way, or they are too simple and don't support the basic stuff you would expect. So I decided to simply port html_Template_Sigma to Python.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;In a way, I managed. My version supports everything that html_Template_Sigma supports. It took me 2,5 days approx. But the experience made me see how a language that tries to win the beauty contest is limited compared to its ugly brother. &lt;strong&gt;Here are some of the problems I met&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No isset()&lt;/strong&gt;. If you use a variable that is not bound to an object, Python raises an exception, even if it's in a comparison clause. And you have no way prior to this exception to check whether the variable was bound. &lt;a href="http://mail.python.org/pipermail/python-list/2005-February/263588.html"
    &gt;Some people suggest to catch the exception...&lt;/a&gt; This is like the chicken and egg problem.&lt;/li&gt;
&lt;br/&gt;
&lt;li&gt;&lt;strong&gt;Too many array types&lt;/strong&gt;. PHP has only one type of array even if it can be used in different manners. Whether it is associative or not, the PHP arrays share the same set of funtions. In Python, you get dictionaries, tuples, lists, etc. And they don't have the same API. Arrays are probably the most useful way to store information in my code, with Python I always have to remember which kind of storage I used.&lt;/li&gt;
&lt;br/&gt;
&lt;li&gt;&lt;strong&gt;Values added to dictionaries are not stored in any specific order&lt;/strong&gt;. Dictionaries are like associative arrays. Except that when you iterate them, the items you carefully added to them are listed in no specific order. This makes them totally useless and even dangerous. And there are no other datatypes provided by default to take care of your data in an ordered way. &lt;a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747"
    &gt;You have to write your own&lt;/a&gt;.&lt;/li&gt;
&lt;br/&gt;
&lt;li&gt;&lt;strong&gt;No easy one liners&lt;/strong&gt;. I use &lt;em&gt;a ? a : b;&lt;/em&gt; quite a bit in my code since it makes it shorter and easier to read (at least for me). You can't do something as simple in Python, you have to use &lt;a href="http://diveintopython.org/power_of_introspection/and_or.html#d0e9975"
    &gt;convoluted ways&lt;/a&gt;.&lt;/li&gt;
&lt;br/&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;There are a lot of other things in Python I felt were missing or wrong compared to PHP. The opposite is also true, but I mostly do web development and &lt;strong&gt;in this area PHP is way beyond&lt;/strong&gt;. I agree that Python is a prettier language but that's not enough. Beauty is a subjective thing and to stay pretty you have to stay slim. I expect a language to provide me with the tools and the syntax to be as productive as possible, eventually with less code.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;Actually, a lot of Python users seem to be in love with their language. They even invented a silly word to define and label other people's code : "&lt;a href="http://faassen.n--tree.net/blog/view/weblog/2005/08/06/0"
    &gt;&lt;em&gt;pythonic&lt;/em&gt;&lt;/a&gt;" and "&lt;em&gt;not pythonic&lt;/em&gt;". It means pretty. For example, interfaces, from Java or PHP5, are &lt;a href="http://mail.python.org/pipermail/python-list/2006-April/336989.html"
     title="Read the whole thread, it is a good example of the Python way of thinking"
    &gt;not pythonic&lt;/a&gt;. I actually got amused by the number of things that were not pythonic.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;"Pythonic" is a geek term. In fact, I think &lt;strong&gt;Python is a language for geeks&lt;/strong&gt;. The majority of Python users have &lt;a href="http://www.artima.com/forums/flat.jsp?forum=106=150515"
    &gt;no idea&lt;/a&gt; about marketing, business, promotion, press, corporate... Commercial terms are dirty. Python programmers like concepts and programming challenges. Python is their playground, their moment of fun, their hobby. There are actually a very little number of Python developers that seem to use the language for their living. Python is often used for prototyping and testing concepts.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;I am not a geek and what I am really after is a tool to help me get more productive at work. Unfortunately, &lt;strong&gt;Python didn't fill my needs&lt;/strong&gt;. I was happy to learn it and it showed me some interesting concepts implemented in interesting ways. Now I can read and write Python code that is maybe not "pythonic" but that does the job. Thanks to my initiation, I also discovered &lt;a href="http://www.selenic.com/mercurial/"
    &gt;Mercurial&lt;/a&gt;, a &lt;strong&gt;very good RCS&lt;/strong&gt;  written in Python and switched to it from Subversion. I didn't loose my time, I simply had to try.&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Now I am learning Ruby and enjoying it so far&lt;/strong&gt;. It seems to fit the bill, along with Rails as a potential replacement to PHP. There is also an Objective-C/Cocoa bridge called &lt;a href="http://rubycocoa.sourceforge.net/"
    &gt;RubyCocoa&lt;/a&gt;. Nothing for the Nokia Series 60, but this will force me to use my new Python skills so it's ok. In terms of beauty, I think Ruby won the contest over Python a long time ago. I will report about my experiences with Ruby later on.&lt;/p&gt;
</content:encoded><dc:subject>Php</dc:subject><dc:subject>Python</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-05-26T11:15:12Z</dc:date></item><item><title>Using CSS and list to build a pager</title><link>http://golgote.freeflux.net/blog/archive/2006/03/18/using-css-and-list-to-build-a-pager.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/77/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;This is one way to build a pager using CSS. A pager is most of the time composed of a Previous page link, links to Pages and a Next page link. It can also have First and Last page links. This can be boring to build dynamically and to have elements aligned correctly, we often use tables. If we could use html lists, this would make the pager more accessible and easier to place in a modern layout (Web 2.0 anyone ?).  Well, here is the solution I came up with.&lt;/p&gt;
&lt;h3&gt;First the markup your pager will generate: &lt;/h3&gt;
&lt;pre&gt;
&amp;lt;ul style="pager"&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/0"&amp;gt;&amp;lt;&amp;lt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/1"&amp;gt;&amp;lt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/1"&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;2&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/3"&amp;gt;3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/4"&amp;gt;4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/5"&amp;gt;5&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/6"&amp;gt;6&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/3"&amp;gt;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="/6"&amp;gt;&amp;gt;&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;
&lt;p&gt;It's pretty straightforward.&lt;/p&gt;
&lt;h3&gt;Now, the css&lt;/h3&gt;
&lt;pre&gt;ul.pager {
	margin: 0;
	padding: 0 ;
	list-style: none;
	text-align: center;
	white-space:nowrap;
}
ul.pager li {
	margin: 0;
	padding: 0;
	list-style: none;
	display: inline;
}&lt;/pre&gt;
&lt;p&gt;Feel free to remove the &lt;b&gt;white-space:nowrap&lt;/b&gt; if you don't mind it if your links wrap when the container is too small to fit them all on one line. The &lt;b&gt;text-align:center&lt;/b&gt; is here so that the links are &lt;b&gt;centered&lt;/b&gt; in the ul container. The trick really consists in making the li elements inline instead of blocks as they usually are.&lt;/p&gt;

&lt;h3&gt;Result&lt;/h3&gt;
&lt;ul style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; text-align: center; white-space: nowrap;"
    &gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//0"
    &gt;&amp;lt;&amp;lt;&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//1"
    &gt;&amp;lt;&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//1"
    &gt;1&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;2&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//3"
    &gt;3&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//4"
    &gt;4&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//5"
    &gt;5&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//6"
    &gt;6&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//3"
    &gt;&amp;gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li style="margin: 0pt; padding: 0pt; list-style-type: none; list-style-image: none; list-style-position: outside; display: inline;"
    &gt;&lt;a href="http://golgote.freeflux.net//6"
    &gt;&amp;gt;&amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Bitmap rendering in Firefox&lt;/h3&gt;
&lt;img src="http://golgote.freeflux.net//files/_galleries/gallery/pager_basic.png"
     alt="Pager rendering"
    /&gt;
&lt;p&gt;I am going to elaborate on this pretty soon and show how such a simple pager can be styled easily. In the meantime, feel free to post your comments about this technique and its compatibility in other browsers.&lt;/p&gt;
</content:encoded><dc:subject>Php</dc:subject><dc:subject>Css</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-03-18T10:52:34Z</dc:date></item><item><title>We are family</title><link>http://golgote.freeflux.net/blog/archive/2006/01/13/we-are-family.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/72/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;My father is PERL 5. My grandfathers are C and sh. My grandmothers are nawk and sed. Who am I ?&lt;/p&gt;
&lt;p&gt;Answer: &lt;a title="Computer languages history"
     href="http://www.levenez.com/lang/history.html"
    &gt;http://www.levenez.com/lang/history.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First time I also here about a Gogol programming language. I wonder what the syntax is like...&lt;/p&gt;</content:encoded><dc:subject>Php</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-01-13T23:30:36Z</dc:date></item><item><title>Guide to PHP Security, small book review</title><link>http://golgote.freeflux.net/blog/archive/2006/01/07/guide-to-php-security-small-book-review.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/69/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;&lt;img alt=""
     src="http://golgote.freeflux.net//files/images/ilia_book_1.jpg"
     style="float: left;"
    /&gt;I ordered Ilia Alshanetsky book - &lt;a href="http://www.phparch.com/shop_product.php?itemid=98"
     title="The book page"
    &gt;php|architect's Guide to PHP Security&lt;/a&gt; - about a month ago. I did so because php|architect said there would be books with Ilia's signature for the first ones being ordered. I thought it would be nice to have one, for the fun and because I enjoyed Ilia's speaks at the International PHP conferences (in Amsterdam).&lt;/p&gt;
&lt;p&gt;Anyway, I received the book without the signature so I was a bit disappointed. I thought I misunderstood the ad. I did not really ordered the book for its content because I thought, with 6 years of PHP programming, I now knew enough about PHP security and stuff like that. I admit my first web applications really sucked in this matter, but now I think they should be ok.&lt;/p&gt;
&lt;p&gt;As I take the underground everyday, I sometimes find myself without anything to read and having nothing to read in Paris underground is pretty boring, so I picked up Ilia's book for the ride.&lt;/p&gt;
&lt;p&gt;Now that I reached the middle of the book (took me approx. 8 underground rides), I can say it's very good and I have discovered many ways to further improve my applications. I learned something new about PHP &lt;strong&gt;on almost every page&lt;/strong&gt;. This book is not exactly for newbies, it sometimes goes into PHP internals and give you excellent tricks on how to improve both your scripts security and performance. The &lt;strong&gt;code examples&lt;/strong&gt; are very short and illustrative. This makes the book very easy and fast to read.&lt;/p&gt;
&lt;p&gt;Ilia definitely knows what he writes about and goes well beyond security by also giving you &lt;strong&gt;useful tricks on PHP performance&lt;/strong&gt; and how PHP works internally.&lt;/p&gt;
&lt;p&gt;The only thing I thought was missing is a chapter about &lt;strong&gt;backup strategies&lt;/strong&gt;, because if your server gets compromised, the only recourse you'll have in most cases are your backups. It would be nice to have this as a free chapter :)&lt;/p&gt;
&lt;p&gt;The good thing is that today (only), php|architect is making a &lt;a href="http://www.phparch.com/news/2792"
     title="Book special offer"
    &gt;special offer&lt;/a&gt; on the book.&lt;/p&gt;</content:encoded><dc:subject>Php</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-01-07T10:50:05Z</dc:date></item><item><title>New year's resolutions</title><link>http://golgote.freeflux.net/blog/archive/2006/01/01/new-year-s-resolutions.html</link><guid isPermaLink="false">http://golgote.freeflux.net/blog/archive/id/62/</guid><content:encoded xmlns="http://www.w3.org/1999/xhtml">&lt;p&gt;And in the IT business domain, my &lt;strong&gt;new year's resolutions for 2006&lt;/strong&gt;...&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Learn &lt;a href="http://www.python.org"
    &gt;Python&lt;/a&gt;. &lt;strong&gt;Python&lt;/strong&gt; is an exciting language with a large community of skilled developers.&lt;/li&gt;
    &lt;li&gt;Make my first Python web application. I am going to use &lt;a href="http://www.lighttpd.net"
    &gt;lighttpd&lt;/a&gt; or &lt;a href="http://snakelets.sourceforge.net"
    &gt;snakelets&lt;/a&gt; for that. Unfortunately, at the moment Python for the web really sucks, so I will start with a small application, something like a &lt;strong&gt;Python photo gallery&lt;/strong&gt;.&lt;/li&gt;
    &lt;li&gt;Release my first &lt;strong&gt;commercial application for Mac OSX&lt;/strong&gt;, written with &lt;a href="http://developer.apple.com/cocoa/"
    &gt;Cocoa&lt;/a&gt;. I already released &lt;a href="http://www.macupdate.com/info.php/id/9991"
    &gt;Rula&lt;/a&gt;, it was free and but is not available anymore because I didn't have the time to maintain it correctly (too many users, with too many good requests). I have written another one (&lt;a href="http://www.mamasam.com/applications/sqlite_create"
    &gt;a manager for sqlite 2&lt;/a&gt;) but sqlite got to version 3 before I got the time to release it, so I sort of postponed the project. My next application will be really cool :) Anyway, it's already work in progress...&lt;/li&gt;
    &lt;li&gt;Release &lt;strong&gt;Phreez&lt;/strong&gt;, my &lt;em&gt;Object persistence with php and pdo&lt;/em&gt; framework, under BSD license (as soon as I have implemented the history feature).&lt;/li&gt;
    &lt;li&gt;Rewrite &lt;a href="http://pear.php.net/html_quickform"
    &gt;&lt;strong&gt;html_QuickForm&lt;/strong&gt;&lt;/a&gt;, probably for Python and PHP5.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Along with all the daily work I have to do, &lt;a href="http://golgote.freeflux.net/gallery/adele-canon-350d/"
    &gt;my little daughter&lt;/a&gt; and other family occupations, these would probably be enough to keep me busy in 2006.&lt;/p&gt;
&lt;p&gt;What are your new year's resolutions ?&lt;/p&gt;</content:encoded><dc:subject>General</dc:subject><dc:subject>Php</dc:subject><dc:subject>Cocoa</dc:subject><dc:subject>Python</dc:subject><dc:creator>golgote</dc:creator><dc:date>2006-01-01T09:33:24Z</dc:date></item></channel></rss>
