<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

	<channel>
		<title>Alfonso Jimenez</title>
		<link>http://www.alfonsojimenez.com</link>
		<description>
			Weblog colectivo dedicado a la actualidad relacionada con
			los gadgets y los dispositivos y cacharros más novedosos.
		</description>
		<pubDate>Thu, 09 Jul 2009 22:55:20 +0000</pubDate>

		<generator>http://www.alfonsojimenez.com</generator>
                    <image><url>http://www.alfonsojimenez.com/images/2006/12/nuevodiseno.png</url></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/alfonsojimenez" type="application/rss+xml" /><feedburner:emailServiceId>alfonsojimenez</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
      <title><![CDATA[Made in Heaven]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/gZa1UYps9hY/made-in-heaven</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/made-in-heaven</guid>
      <pubDate>Mon, 01 Jun 2009 07:28:29 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/06/josep-guardiola-dios.jpg" alt="Josep Guardiola - Portada de El Periódico de Catalunya" class="centro" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/gZa1UYps9hY" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/made-in-heaven</feedburner:origLink></item>
                    <item>
      <title><![CDATA[The dessert]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/mzAX2jCHxK4/the-dessert</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/the-dessert</guid>
      <pubDate>Wed, 27 May 2009 20:30:47 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/05/barcelona-manchester-final.jpg" class="centro" alt="FC Barcelona vs Manchester United - Champions League Final : Messi, Iniesta and Henry" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/mzAX2jCHxK4" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/the-dessert</feedburner:origLink></item>
                    <item>
      <title><![CDATA[The main course]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/NZ86zyo8RZ4/the-main-course</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/the-main-course</guid>
      <pubDate>Sat, 23 May 2009 20:30:22 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/05/main_course_barcelona.jpg" class="centro" alt="Liga 2008/2009 FC Barcelona - Barça" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/NZ86zyo8RZ4" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/the-main-course</feedburner:origLink></item>
                    <item>
      <title><![CDATA[The starter]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/t80d4uo-gOE/the-starter</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/the-starter</guid>
      <pubDate>Wed, 13 May 2009 20:33:40 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/05/copa-del-rey.jpg" alt="Copa del Rey" class="centro" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/t80d4uo-gOE" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/the-starter</feedburner:origLink></item>
                    <item>
      <title><![CDATA[Rome, here we go]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/SfvP_OENIac/rome-here-we-go</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/rome-here-we-go</guid>
      <pubDate>Wed, 06 May 2009 20:14:44 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/05/sweet-iniesta.jpg" class="centro" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/SfvP_OENIac" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/rome-here-we-go</feedburner:origLink></item>
                    <item>
      <title><![CDATA[This is a chorreo]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/ZzWhyQF8byc/this-is-a-chorreo</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/football/this-is-a-chorreo</guid>
      <pubDate>Sat, 02 May 2009 20:43:11 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/05/chorreo.jpg" alt="Chorreo Madrid Barcelona" class="centro" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/ZzWhyQF8byc" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/football/this-is-a-chorreo</feedburner:origLink></item>
                    <item>
      <title><![CDATA[phpredis, 2 Fast 2 Furious]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/iB4GExEhmkE/phpredis-2-fast-2-furious</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/computers/phpredis-2-fast-2-furious</guid>
      <pubDate>Tue, 21 Apr 2009 08:00:01 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/04/redis.jpg" class="derecha_sinmarco" alt="phpredis" /&gt;&lt;strong&gt;Redis&lt;/strong&gt; (REmote DIctionary Server) is a persistent key-value database with built-in net interface written in &lt;span class="caps"&gt;ANSI-C&lt;/span&gt; for Posix systems. Whilst it may at first seem like the wheel is being reinvented here, the need for something beyond a simple key-value database is pretty clear. It&amp;#8217;s possible to use &lt;strong&gt;Redis&lt;/strong&gt; like a replacement of &lt;strong&gt;memcached&lt;/strong&gt;, with the main difference being the dataset is stored persistently &amp;#8211; not volatile data &amp;#8211; and &lt;strong&gt;Redis&lt;/strong&gt; introduces new data structures such as &lt;strong&gt;list&lt;/strong&gt; and &lt;strong&gt;sets&lt;/strong&gt;. Furthermore, it implements atomic operations in order to interoperate with these data structures.&lt;/p&gt;

	&lt;p&gt;I released a &lt;strong&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; extension&lt;/strong&gt; called &lt;a href="http://code.google.com/p/phpredis/" title="phpredis - PHP Extension for Redis"&gt;phpredis&lt;/a&gt; a couple of weeks ago, which works as a &lt;span class="caps"&gt;PHP&lt;/span&gt; client &lt;span class="caps"&gt;API&lt;/span&gt; for &lt;strong&gt;Redis&lt;/strong&gt;. The project is hosted at Google Code at the moment, and you can get the code directly from the &lt;span class="caps"&gt;SVN&lt;/span&gt; repository: &lt;a href="http://phpredis.googlecode.com/svn/trunk/" title="phpredis"&gt;http://phpredis.googlecode.com/svn/trunk/&lt;/a&gt;.&lt;/p&gt;

	&lt;p&gt;Despite a &lt;em&gt;vanilla&lt;/em&gt; &lt;span class="caps"&gt;PHP&lt;/span&gt; client library already exists, I felt the need to write it since a &lt;span class="caps"&gt;PHP&lt;/span&gt; extension normally performs better and I wanted to make the most of &lt;strong&gt;Redis&lt;/strong&gt; potential.&lt;/p&gt;

	&lt;p&gt;Let&amp;#8217;s see a snippet of how to make a simple operation to &lt;strong&gt;Redis&lt;/strong&gt; using the &lt;span class="caps"&gt;PHP&lt;/span&gt; client:&lt;/p&gt;

	&lt;p&gt;&lt;pre class="sh_php"&gt;
    $redis = new Redis();
    $redis-&gt;connect(&amp;#8216;127.0.0.1&amp;#8217;, 6379);&lt;/p&gt;

    $redis-&gt;set(&amp;#8216;key&amp;#8217;, 27);

    echo $redis-&gt;get(&amp;#8216;key&amp;#8217;); // it should print 27

    $redis-&gt;incrby(&amp;#8216;key&amp;#8217;, 3);

    echo $redis-&gt;get(&amp;#8216;key&amp;#8217;); // it should print 30
&lt;/pre&gt;

	&lt;p&gt;The code above was quite obvious, it stored a value associate to &lt;em&gt;key&lt;/em&gt; and it increments its value by 3. Let&amp;#8217;s see another snippet a bit more complex, for example using a &lt;em&gt;list&lt;/em&gt;:&lt;/p&gt;

	&lt;p&gt;&lt;pre class="sh_php"&gt;
    $redis = new Redis();
    $redis-&gt;connect(&amp;#8216;127.0.0.1&amp;#8217;, 6379);&lt;/p&gt;

    $redis-&gt;lPush(&amp;#8216;list&amp;#8217;, &amp;#8216;val&amp;#8217;);
    $redis-&gt;lPush(&amp;#8216;list&amp;#8217;, &amp;#8216;val2&amp;#8217;);
    $redis-&gt;lPush(&amp;#8216;list&amp;#8217;, &amp;#8216;val3&amp;#8217;, 1);

    echo $redis-&gt;lPop(&amp;#8216;list&amp;#8217;, 1); // it should print val3
    echo $redis-&gt;lPop(&amp;#8216;list&amp;#8217;); // it should print val2   
    echo $this-&gt;lPop(&amp;#8216;list&amp;#8217;); //it should print val 
&lt;/pre&gt;

	&lt;p&gt;Notice that depending on the last optional parameter (0 by default) it&amp;#8217;s possible to append/extract an element to/from the tail or to/from the head of the list.&lt;/p&gt;

	&lt;p&gt;There is a list including all the &lt;a href="http://code.google.com/p/phpredis/wiki/referencemethods"&gt;available methods&lt;/a&gt;. At the moment, I&amp;#8217;m working on the implementation of more new Redis commands and on the support for complex data structures such as arrays and &lt;span class="caps"&gt;PHP&lt;/span&gt; objects.&lt;/p&gt;

	&lt;p&gt;Apart from &lt;strong&gt;phpredis&lt;/strong&gt;, there are more client &lt;span class="caps"&gt;API&lt;/span&gt; for languages as Perl, Python, Ruby and Erlang. You can find this and more at the &lt;a href="http://code.google.com/p/redis/" title="Redis Database"&gt;Redis project homepage&lt;/a&gt;. Redis has been written by Salvatore Sanfilippo who I&amp;#8217;m chuffed to bits with.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/iB4GExEhmkE" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/computers/phpredis-2-fast-2-furious</feedburner:origLink></item>
                    <item>
      <title><![CDATA[Essential Java resources]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/3jVreD6Cti4/essential-java-resources</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/computers/essential-java-resources</guid>
      <pubDate>Tue, 27 Jan 2009 08:40:26 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;strong&gt;Ted Neward&lt;/strong&gt;, a consultant with &lt;em&gt;ThoughtWorks&lt;/em&gt; and the principal of &lt;em&gt;Neward &amp;#038; Associates&lt;/em&gt;, has published a &lt;a href="http://www.ibm.com/developerworks/java/library/j-javaresources.html" title="Essential Java resources"&gt;list&lt;/a&gt; of libraries, tools and other resources - such as books, conferences or weblogs - any up-and-coming Java developer should have. The &lt;strong&gt;Java platform&lt;/strong&gt; will be celebrating its 14th birthday soon, and it&amp;#8217;s time to revise the story of one of most &lt;a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html" rel="nofollow"&gt;extended languages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/01/coffee.jpg" class="centro" alt="Java Coffee" /&gt;&lt;/p&gt;
&lt;p&gt;Link | &lt;a href="http://www.ibm.com/developerworks/java/library/j-javaresources.html" title="Essential Java resources"&gt;Essential Java resources&lt;/a&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/3jVreD6Cti4" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/computers/essential-java-resources</feedburner:origLink></item>
                    <item>
      <title><![CDATA[PHP.JS, PHP functions in Javascript]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/R5f0JzkarwY/phpjs-php-functions-in-javascript</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/computers/phpjs-php-functions-in-javascript</guid>
      <pubDate>Sat, 10 Jan 2009 19:01:52 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;p&gt;&lt;img src="http://img.alfonsojimenez.com/2009/01/phpjs.jpg" class="derecha" alt="PHP.JS" /&gt;&lt;strong&gt;PHP.JS&lt;/strong&gt; is a project with the purpose of porting standard &lt;strong&gt;PHP functions&lt;/strong&gt; over to &lt;strong&gt;Javascript&lt;/strong&gt;. The project was taken up by Kevin van Zonneveld, a dutch developer who had developed a small JS library of PHP functions for his job. Kevin shared the library on his blog and came into Open Source. Then many developers made contributions with new PHP functions written in JS and this is how the spark caught flame.&lt;/p&gt;
&lt;p&gt;It offers added functionality on top of JS with functions like &lt;strong&gt;md5()&lt;/strong&gt;, &lt;strong&gt;file_get_contents()&lt;/strong&gt;, and &lt;strong&gt;utf8_encode()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Official site | &lt;a href="http://phpjs.org/" title="PHP.JS"&gt;PHP.JS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I&amp;#8217;ve contributed to the project with a couple of &lt;a href="http://phpjs.org/authors/alfonso-jimenez:48e4b526-83f4-4747-8e82-2d6486a786ee" title="Alfonso Jiménez on PHP.JS"&gt;functions&lt;/a&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/R5f0JzkarwY" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/computers/phpjs-php-functions-in-javascript</feedburner:origLink></item>
                    <item>
      <title><![CDATA[Bash tricks]]></title>
      <link>http://feedproxy.google.com/~r/alfonsojimenez/~3/is_fsbqsXYo/bash-tricks</link>
      <guid isPermaLink="false">http://www.alfonsojimenez.com/curiosities/bash-tricks</guid>
      <pubDate>Sat, 10 Jan 2009 17:34:52 +0000</pubDate>

      <author>alfonso</author>
      <description>&lt;pre class="sh_php"&gt;th3j0ker@alexandra:~$ echo hello
hello
th3j0ker@alexandra:~$ ^hello^bye^
echo bye
bye&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/alfonsojimenez/~4/is_fsbqsXYo" height="1" width="1"/&gt;</description>
      <feedburner:origLink>http://www.alfonsojimenez.com/curiosities/bash-tricks</feedburner:origLink></item>
        	  
	</channel>

</rss>
